ports/devel/py-qutip/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

39 lines
1.4 KiB
Makefile

PORTNAME= qutip
DISTVERSION= 5.0.4
CATEGORIES= devel
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Quantum toolbox in python
WWW= https://qutip.org/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
PY_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}scipy>=1.9:science/py-scipy@${PY_FLAVOR}
BUILD_DEPENDS= ${PY_DEPENDS} \
${PY_SETUPTOOLS} \
${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0.32.0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PY_DEPENDS}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR}
# the optional graphics/py-mayavi dependency is omitted because it is python-2.7 -only
USES= python
USE_PYTHON= autoplist cython3 cython3_run pep517
post-install:
@${STRIP_CMD} \
${STAGEDIR}${PYTHON_SITELIBDIR}/qutip/*/*${PYTHON_EXT_SUFFIX}.so \
${STAGEDIR}${PYTHON_SITELIBDIR}/qutip/*/*/*${PYTHON_EXT_SUFFIX}.so
do-test: # 3 tests fail, see https://github.com/qutip/qutip/issues/2190
@${ECHO} "==> Running tests. Please note that tests require X11 display access."
@cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} \
${PYTHON_CMD} -c "import qutip.testing as qt; qt.run();"
.include <bsd.port.mk>