Date: Wed, 24 Nov 2021 17:01:42 GMT From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: ab67421b6e9f - main - lang/cython-devel: add port Message-ID: <202111241701.1AOH1gDk070910@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=ab67421b6e9f96ffc0975cc8f28e57fc71612127 commit ab67421b6e9f96ffc0975cc8f28e57fc71612127 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2021-11-17 13:42:48 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2021-11-24 17:00:33 +0000 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) --- Mk/Uses/python.mk | 10 ++++++++-- lang/Makefile | 1 + lang/cython-devel/Makefile | 21 +++++++++++++++++++++ lang/cython-devel/distinfo | 3 +++ lang/cython-devel/pkg-descr | 16 ++++++++++++++++ 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111241701.1AOH1gDk070910>