# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 119604 2014-05-02 09:12:57Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           bitbucket 1.0
PortGroup           mpi 1.0

mpi.setup           require

bitbucket.setup     petsc petsc4py d8c869f40125
name                py-petsc4py
version             3.4
revision            1
categories-append   math
platforms           darwin
universal_variant   no
description         PETSc for Python - Python bindings for PETSc
long_description    PETSc is a suite of data structures and routines for the scalable \
                    (parallel) solution of scientific applications modeled by partial \
                    differential equations. It employs the MPI standard for all \
                    message-passing communication.

maintainers         sean openmaintainer

checksums           rmd160  eaeb095f088dc232ba8ad89bc5df4f094d6b4cf7 \
                    sha256  f168f60471d2899e4c4708460c7548b6d27550b9bda1cabac8a461dd46b46d76

python.versions     26 27

build.env-append    PETSC_DIR=${prefix}/lib/petsc
destroot.env-append PETSC_DIR=${prefix}/lib/petsc

if {![mpi_variant_isset]} {
    default_variants +mpich
}

if {${subport} ne ${name}} {
    mpi.enforce_variant \
                    py${python.version}-mpi4py

    depends_build-append \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-cython

    depends_lib-append \
                    port:petsc \
                    port:py${python.version}-mpi4py \
                    port:py${python.version}-numpy

    livecheck.type  none
}
