diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2021-11-17 13:42:48 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2021-11-24 17:00:33 +0000 |
commit | ab67421b6e9f96ffc0975cc8f28e57fc71612127 (patch) | |
tree | 2158ef4d528f936193a0d7d23cc77fb84e2390de | |
parent | 3a9b50d65c7599a8c89afe8c9309a64e5eef8a59 (diff) |
lang/cython-devel: add port
Add devel version of cython. Apart from that 3.x cython branch is
where all the development goes on, 0.29.x only getting backported
bugfixes, this is currently the only version which supports python
3.11. Because of that, wire USE_PYTHON=cython to cython-devel for
python >= 3.11 in Uses/python.mk as well and limit supported python
versions with <= 3.10 for cython.
PR: 259898
Approved by: python (lwhsu)
-rw-r--r-- | Mk/Uses/python.mk | 10 | ||||
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/cython-devel/Makefile | 21 | ||||
-rw-r--r-- | lang/cython-devel/distinfo | 3 | ||||
-rw-r--r-- | lang/cython-devel/pkg-descr | 16 | ||||
-rw-r--r-- | lang/cython/Makefile | 2 |
6 files changed, 50 insertions, 3 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 2a12dad52d4f..9150ba0453a2 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -515,12 +515,18 @@ _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp # - it uses USE_PYTHON=distutils # +.if ${PYTHON_REL} >= 31100 +_CYTHON_DEP= cython-${PYTHON_VER}:lang/cython-devel@${PY_FLAVOR} +.else +_CYTHON_DEP= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} +.endif + .if defined(_PYTHON_FEATURE_CYTHON) -BUILD_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} +BUILD_DEPENDS+= ${_CYTHON_DEP} .endif .if defined(_PYTHON_FEATURE_CYTHON_RUN) -RUN_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} +RUN_DEPENDS+= ${_CYTHON_DEP} .endif .if defined(_PYTHON_FEATURE_CONCURRENT) diff --git a/lang/Makefile b/lang/Makefile index 7009a8a5e602..dd751b907a5f 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -41,6 +41,7 @@ SUBDIR += crystal SUBDIR += csharp-mode.el SUBDIR += cython + SUBDIR += cython-devel SUBDIR += dlang-tools SUBDIR += dlv SUBDIR += duktape diff --git a/lang/cython-devel/Makefile b/lang/cython-devel/Makefile new file mode 100644 index 000000000000..07f6c91b3d79 --- /dev/null +++ b/lang/cython-devel/Makefile @@ -0,0 +1,21 @@ +PORTNAME= cython +DISTVERSION= 3.0.0a9 +CATEGORIES= lang python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +PKGNAMESUFFIX= -devel + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= Compiler for Writing C Extensions for the Python Language + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +USES= compiler:c11 python:2.7+ +USE_PYTHON= allflavors autoplist concurrent distutils +USE_GITHUB= yes +GH_TAGNAME= 2b1e743 + +post-install: + ${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/Cython -name '*.so' -exec ${STRIP_CMD} {} + + +.include <bsd.port.mk> diff --git a/lang/cython-devel/distinfo b/lang/cython-devel/distinfo new file mode 100644 index 000000000000..b3b6fa1b0b2b --- /dev/null +++ b/lang/cython-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1637154492 +SHA256 (cython-cython-3.0.0a9-2b1e743_GH0.tar.gz) = 9e0b6f5830e86a942faefdc728df2c2ad0cb3cbf74efe6e7fa020e18692ac9a3 +SIZE (cython-cython-3.0.0a9-2b1e743_GH0.tar.gz) = 2438723 diff --git a/lang/cython-devel/pkg-descr b/lang/cython-devel/pkg-descr new file mode 100644 index 000000000000..8ace83e15851 --- /dev/null +++ b/lang/cython-devel/pkg-descr @@ -0,0 +1,16 @@ +The Cython language makes writing C extensions for the Python language +as easy as Python itself. Cython is a source code translator based on +the well-known Pyrex, but supports more cutting edge functionality and +optimizations. + +The Cython language is very close to the Python language (and most +Python code is also valid Cython code), but Cython additionally supports +calling C functions and declaring C types on variables and class +attributes. This allows the compiler to generate very efficient C code +from Cython code. + +This makes Cython the ideal language for writing glue code for external +C libraries, and for fast C modules that speed up the execution of +Python code. + +WWW: https://cython.org/ diff --git a/lang/cython/Makefile b/lang/cython/Makefile index c3e4d1b1e42c..e77cb41d4311 100644 --- a/lang/cython/Makefile +++ b/lang/cython/Makefile @@ -13,7 +13,7 @@ COMMENT= Compiler for Writing C Extensions for the Python Language LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -USES= compiler:c11 python:2.7+ +USES= compiler:c11 python:2.7-3.10 USE_PYTHON= allflavors autoplist concurrent distutils post-install: |