ports/science/py-dwave-preprocessing/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

37 lines
1.3 KiB
Makefile

PORTNAME= dwave-preprocessing
DISTVERSION= 0.6.6
PORTREVISION= 1
CATEGORIES= science python # quantum-computing
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= DWave: Preprocessing tools to aid in solving binary quadratic models
WWW= https://github.com/dwavesystems/dwave-preprocessing
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dimod>=0.12.6:science/py-dimod@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dimod>=0.12.6:science/py-dimod@${PY_FLAVOR} \
${PYNUMPY}
USES= localbase:ldflags python
USE_PYTHON= cython3 distutils unittest # 1 test fails, see https://github.com/dwavesystems/dwave-preprocessing/issues/74
USE_GITHUB= yes
GH_ACCOUNT= dwavesystems
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
TEST_WRKSRC= ${WRKSRC}/tests
post-install:
# strip binaries
@${STRIP_CMD} \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/preprocessing/cyfix_variables${PYTHON_EXT_SUFFIX}.so \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/preprocessing/presolve/cypresolve${PYTHON_EXT_SUFFIX}.so
# remove conflicting __init__.py, see https://github.com/dwavesystems/dwave-preprocessing/issues/45
@${RM} -r \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/__init__.py \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/__pycache__
.include <bsd.port.mk>