ports/math/py-petsc4py/Makefile
Po-Chuan Hsieh 150c0018fd
Mk/Uses/python.mk: Introduce USE_PYTHON=cython3{,_run,_test}
- Update USE_PYTHON=cython{,_run,_test}
- Convert all cython3 occurrence to USE_PYTHON=cython3*
- While I'm here, fix incorrect usage of combining cython3 in BUILD_DEPENDS and USE_PYTHON=cython

It is added to simplify the future transition from Cython 0.29 to 3.

The minimal version is set to 3.0.12 because it is required by devel/py-propcache.
The upper bound of version is set to 3.1 because it is limited by multiple ports.
2025-04-09 22:55:11 +08:00

38 lines
918 B
Makefile

PORTNAME= petsc4py
DISTVERSION= 3.22.4
CATEGORIES= math python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= PETSc for Python
WWW= https://gitlab.com/petsc/petsc
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.rst
BROKEN_armv7= compilation fails: LLVM ERROR: out of memory
BUILD_DEPENDS= ${PYNUMPY}
LIB_DEPENDS= libpetsc.so:science/PETSc
RUN_DEPENDS= ${PYNUMPY}
USES= python
USE_PYTHON= autoplist cython3 distutils pytest # tests fail to run, see https://gitlab.com/petsc/petsc/-/issues/1301
MAKE_ENV= PETSC_DIR=${LOCALBASE}
OPTIONS_SINGLE= MPI
OPTIONS_SINGLE_MPI= MPICH OPENMPI
OPTIONS_DEFAULT= MPICH
MPICH_USES= mpi:mpich
OPENMPI_USES= mpi:openmpi
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/petsc4py/lib/PETSc${PYTHON_EXT_SUFFIX}.so
.include <bsd.port.mk>