Skip to content

Commit 150c001

Browse files
committed
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.
1 parent 6012fb6 commit 150c001

File tree

48 files changed

+105
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+105
-133
lines changed

‎Mk/Uses/python.mk‎

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
#
9797
# cython_test - Depend on lang/cython for tests.
9898
#
99+
# cython3 - Depend on lang/cython3 at build-time.
100+
#
101+
# cython3_run - Depend on lang/cython3 at run-time.
102+
#
103+
# cython3_test - Depend on lang/cython3 for tests.
104+
#
99105
# flavors - Force creation of flavors for Python 2 and 3 default
100106
# versions, where applicable.
101107
#
@@ -331,6 +337,9 @@ _VALID_PYTHON_FEATURES= allflavors \
331337
cython \
332338
cython_run \
333339
cython_test \
340+
cython3 \
341+
cython3_run \
342+
cython3_test \
334343
distutils \
335344
flavors \
336345
noegginfo \
@@ -624,16 +633,29 @@ TEST_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS}
624633
. endif
625634

626635
# cython* support
636+
627637
. if defined(_PYTHON_FEATURE_CYTHON)
628-
BUILD_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
638+
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cython>=0.29.37<3:lang/cython@${PY_FLAVOR}
629639
. endif
630640

631641
. if defined(_PYTHON_FEATURE_CYTHON_RUN)
632-
RUN_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
642+
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cython>=0.29.37<3:lang/cython@${PY_FLAVOR}
633643
. endif
634644

635645
. if defined(_PYTHON_FEATURE_CYTHON_TEST)
636-
TEST_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
646+
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cython>=0.29.37<3:lang/cython@${PY_FLAVOR}
647+
. endif
648+
649+
. if defined(_PYTHON_FEATURE_CYTHON3)
650+
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cython3>=3.0.12<3.1:lang/cython3@${PY_FLAVOR}
651+
. endif
652+
653+
. if defined(_PYTHON_FEATURE_CYTHON3_RUN)
654+
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cython3>=3.0.12<3.1:lang/cython3@${PY_FLAVOR}
655+
. endif
656+
657+
. if defined(_PYTHON_FEATURE_CYTHON3_TEST)
658+
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cython3>=3.0.12<3.1:lang/cython3@${PY_FLAVOR}
637659
. endif
638660

639661
. if defined(_PYTHON_FEATURE_CONCURRENT)

‎astro/py-astropy/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ LICENSE= BSD3CLAUSE
1414
LICENSE_FILE= ${WRKSRC}/LICENSE.rst
1515

1616
BUILD_DEPENDS= ${PYNUMPY} \
17-
${PYTHON_PKGNAMEPREFIX}cython3>=3.0:lang/cython3@${PY_FLAVOR} \
1817
${PYTHON_PKGNAMEPREFIX}extension-helpers>=0:astro/py-extension-helpers@${PY_FLAVOR}
1918
RUN_DEPENDS= ${PYNUMPY} \
2019
${PYTHON_PKGNAMEPREFIX}pyerfa>=0:astro/py-pyerfa@${PY_FLAVOR} \
2120
${PYTHON_PKGNAMEPREFIX}astropy-iers-data>=0:astro/py-astropy-iers-data@${PY_FLAVOR}
2221

2322
USES= compiler:c11 python
24-
USE_PYTHON= autoplist distutils
23+
USE_PYTHON= autoplist cython3 distutils
2524

2625
CONFLICTS_INSTALL= p5-Data-ShowTable # bin/showtable
2726

‎biology/py-bx-python/Makefile‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ LICENSE= MIT
1414
LICENSE_FILE= ${WRKSRC}/LICENSE
1515

1616
PY_DEPENDS= ${PYNUMPY}
17-
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3@${PY_FLAVOR} \
18-
${PY_DEPENDS}
17+
BUILD_DEPENDS= ${PY_DEPENDS}
1918
RUN_DEPENDS= ${PY_DEPENDS}
2019

2120
USES= compiler python
22-
USE_PYTHON= distutils autoplist
21+
USE_PYTHON= autoplist cython3 distutils
2322

2423
post-install:
2524
@${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/bx -name "*.so" | ${XARGS} ${STRIP_CMD}

‎biology/py-dnaio/Makefile‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
1313

1414
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
1515
${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \
16-
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
17-
${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3@${PY_FLAVOR}
16+
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
1817

1918
USES= python
20-
USE_PYTHON= autoplist pep517
19+
USE_PYTHON= autoplist cython3 pep517
2120

2221
.include <bsd.port.mk>

‎biology/py-macs3/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ COMMON_DEPENDS= ${PYNUMPY} \
2121
${PYTHON_PKGNAMEPREFIX}hmmlearn>=0.3.2:math/py-hmmlearn@${PY_FLAVOR}
2222
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
2323
simde>0:devel/simde \
24-
${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3 \
2524
${COMMON_DEPENDS}
2625
RUN_DEPENDS= ${COMMON_DEPENDS}
2726
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
@@ -30,7 +29,7 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
3029
USES= localbase perl5 python shebangfix
3130
USE_GITHUB= yes
3231
USE_PERL5= test
33-
USE_PYTHON= autoplist concurrent distutils
32+
USE_PYTHON= autoplist concurrent cython3 distutils
3433

3534
GH_ACCOUNT= macs3-project
3635
GH_PROJECT= MACS

‎biology/py-pyrodigal/Makefile‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ WWW= https://pyrodigal.readthedocs.io/en/stable/ \
1212
LICENSE= GPLv3
1313
LICENSE_FILE= ${WRKSRC}/COPYING
1414

15-
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3@${PY_FLAVOR} \
16-
${PYTHON_PKGNAMEPREFIX}scikit-build-core>0:devel/py-scikit-build-core@${PY_FLAVOR}
15+
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scikit-build-core>0:devel/py-scikit-build-core@${PY_FLAVOR}
1716
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}archspec>0:devel/py-archspec@${PY_FLAVOR}
1817

1918
USES= cmake:indirect python
20-
USE_PYTHON= pep517 concurrent autoplist pytest # cython: cython3 isn't yet supported by python.mk
19+
USE_PYTHON= autoplist concurrent cython3 pep517 pytest
2120

2221
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
2322

‎comms/py-libimobiledevice/Makefile‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ COMMENT= Python bindings for libimobiledevice
77

88
LIB_DEPENDS= libimobiledevice-1.0.so:${MASTER_PORT} \
99
libplist-2.0.so:devel/libplist
10-
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libplist>=2.2.0:devel/py-libplist@${PY_FLAVOR} \
11-
${PYTHON_PKGNAMEPREFIX}cython3>=3.0.0:lang/cython3@${PY_FLAVOR}
10+
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libplist>=2.2.0:devel/py-libplist@${PY_FLAVOR}
1211
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libplist>=2.2.0:devel/py-libplist@${PY_FLAVOR}
1312

1413
USES+= python
15-
USE_PYTHON= flavors
14+
USE_PYTHON= cython3 flavors
1615

1716
CONFIGURE_ENV= PYTHON_LDFLAGS="`pkg-config --libs python-${PYTHON_VER}`"
1817

‎converters/py-rencode/Makefile‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ WWW= https://github.com/aresch/rencode
1111
LICENSE= GPLv3
1212
LICENSE_FILE= ${WRKSRC}/COPYING
1313

14-
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3@${PY_FLAVOR} \
15-
${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
14+
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
1615
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
1716

1817
USES= cpe python
1918
CPE_VENDOR= ${PORTNAME}_project
20-
USE_PYTHON= autoplist pep517
19+
USE_PYTHON= autoplist cython3 pep517
2120

2221
USE_GITHUB= yes
2322
GH_ACCOUNT= aresch

‎databases/py-snowflake-connector-python/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ WWW= https://github.com/snowflakedb/snowflake-connector-python
1212

1313
LICENSE= APACHE20
1414

15-
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3@${PY_FLAVOR}
1615
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asn1crypto>0.24.0<2.0.0:devel/py-asn1crypto@${PY_FLAVOR} \
1716
${PYTHON_PKGNAMEPREFIX}cffi>=1.9<2:devel/py-cffi@${PY_FLAVOR} \
1817
${PYTHON_PKGNAMEPREFIX}openssl>=16.2.0:security/py-openssl@${PY_FLAVOR} \
@@ -30,7 +29,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asn1crypto>0.24.0<2.0.0:devel/py-asn1crypto@
3029
${PYTHON_PKGNAMEPREFIX}tomlkit>0:textproc/py-tomlkit@${PY_FLAVOR}
3130

3231
USES= python
33-
USE_PYTHON= autoplist concurrent cryptography distutils
32+
USE_PYTHON= autoplist concurrent cryptography cython3 distutils
3433

3534
.include <bsd.port.pre.mk>
3635

‎devel/py-ewah-bool-utils/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ LICENSE= BSD3CLAUSE
1313
LICENSE_FILE= ${WRKSRC}/LICENSE
1414

1515
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
16-
${PYTHON_PKGNAMEPREFIX}cython3>=3.0:lang/cython3@${PY_FLAVOR} \
1716
${PYTHON_PKGNAMEPREFIX}wheel>=0.37.1:devel/py-wheel@${PY_FLAVOR} \
1817
${PYNUMPY}
1918
RUN_DEPENDS= ${PYNUMPY}
2019

2120
USES= python
22-
USE_PYTHON= pep517 autoplist pytest
21+
USE_PYTHON= autoplist cython3 pep517 pytest
2322

2423
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} # tests fail to run, see https://github.com/yt-project/ewah_bool_utils/issues/41
2524
TEST_WRKSRC= ${WRKSRC}/tests

0 commit comments

Comments
 (0)