# -*- 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

PortSystem          1.0
PortGroup           python 1.0
PortGroup           bitbucket 1.0
PortGroup           mpi 1.0

bitbucket.setup     petsc petsc4py 3.13.0
name                py-petsc4py
revision            0
categories-append   math
license             BSD
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         {mcalhoun @MarcusCalhoun-Lopez} openmaintainer

checksums           rmd160  b0c59e9795aecb871f199dc4f1f7e8d11f242c6f \
                    sha256  fd41d9c399f8a110f33b62c46ece776755113116bf42d4984053ea3a52a3efae \
                    size    248812

mpi.setup           require

python.versions     27 35 36 37 38

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

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
}
