diff options
Diffstat (limited to 'dev-python/cython')
-rw-r--r-- | dev-python/cython/Manifest | 7 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.21-r1.ebuild | 75 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.21.ebuild | 81 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.22.ebuild | 76 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.23.ebuild | 78 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.24.ebuild | 75 | ||||
-rw-r--r-- | dev-python/cython/cython-3.0.10.ebuild | 84 | ||||
-rw-r--r-- | dev-python/cython/cython-3.0.8.ebuild | 84 | ||||
-rw-r--r-- | dev-python/cython/cython-3.0.9.ebuild | 84 | ||||
-rw-r--r-- | dev-python/cython/files/50cython-gentoo.el | 11 | ||||
-rw-r--r-- | dev-python/cython/files/cython-0.29.14-sphinx-update.patch | 13 | ||||
-rw-r--r-- | dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch | 29 | ||||
-rw-r--r-- | dev-python/cython/files/cython-0.29.23-pythran-parallel-install.patch | 20 | ||||
-rw-r--r-- | dev-python/cython/files/cython-0.29.23-tracing-py310.patch | 213 | ||||
-rw-r--r-- | dev-python/cython/metadata.xml | 2 |
15 files changed, 276 insertions, 656 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest index fd8f839f119b..460c3e92d543 100644 --- a/dev-python/cython/Manifest +++ b/dev-python/cython/Manifest @@ -1,4 +1,3 @@ -DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679 -DIST cython-0.29.22.gh.tar.gz 2091955 BLAKE2B 8225fa6073d43de1e44e8cd22d52f9bde5d3b6e6e766c74d5ef18d77b57c0e1b22a21cae5b133b0b22f7207aa51dc0e76f1073db977190d42c2b55cc2d7e148e SHA512 b7f22112678f159bf1d0ad5fe4f7c103e96f240bab4d9dc07edd7c2f66a9887b9af72b32f1d5886361b48d428bc2b9499d3c5b59ce5af1068f20a26549783dd6 -DIST cython-0.29.23.gh.tar.gz 2093463 BLAKE2B c710b9bc9e05e0030dff3098857b349564fd167f7d9c47e2ef4e8897e072f67497b8ed3994f45135c21f8b2bf3a2cff016fec9a808b2bbe9712174dd0a6b1a3e SHA512 093b7a1d5c68f6e2d2b9b8adb9ac99e8967ddd0a66c0513a78e88bd55d96533dd8352b2478554fb53bf32a72d730967fb08ccb2eaa462da68f86891dceb4925a -DIST cython-0.29.24.gh.tar.gz 2097245 BLAKE2B 9f5f2da0aed61d7fda2e14ea0669a2dd187cd053f3b82621342c7be29e26ff581b673a32e43bacd5c0df3e515f250eb23a64b1dae8911132fdca48175910a3dc SHA512 387a827f3cb7428248019744e3ed606a133d98ac882b83624d24ae0fdf8a8f2334978555d7d84e5cc4adaf715c541fef64e45bcbdda85ca33473c21f99360be8 +DIST cython-3.0.10.gh.tar.gz 2771679 BLAKE2B f0813afc291bdc4940cd6770a368eca4f6d9fd728e41e9c341970512196154be900600146f98ce1e5a056eaeeda2df2a59fea2a9973c3ec275fe605bfd12e418 SHA512 97aa831cea96c1f3c51653c51fadb0aea8bdfdb076a2c898862637f52b826bcb9162d1b7aade3304c5650d0b894cb1083052f036365d79cd3d390e0486b33ac5 +DIST cython-3.0.8.gh.tar.gz 2764668 BLAKE2B 03202ea480fa398d2b0893cc96185467009c783cf4451fc5d1c09ec229398bc084276680ed2b64acf63253744f827427e03674be3e5985d5a2912d9f338c786a SHA512 1070fc278401990595d177b0e6396bc1eba2ea8234a7c5bb26399b6b7284de7791ee5fa60ef74d06d0f4120b9c877bfd7703a7d701838f1634737526c614b860 +DIST cython-3.0.9.gh.tar.gz 2769345 BLAKE2B 2a21b5e7060727d727902a08d7e038dacc047b724ebaa496ba5768542e28eec3c6198062ac3dd774a4321204752b373516f193f01bc6951e5f38b6029754647e SHA512 7899474882faab14716973783bbb46b981eab48192791acbbd06133efee83bfa9ace0e9a0272b0a44061a95ed94cdceaa98c4100f843220f5987791e36fa00e6 diff --git a/dev-python/cython/cython-0.29.21-r1.ebuild b/dev-python/cython/cython-0.29.21-r1.ebuild deleted file mode 100644 index d2425d2b6e78..000000000000 --- a/dev-python/cython/cython-0.29.21-r1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7..9} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 toolchain-funcs elisp-common - -DESCRIPTION="A Python to C compiler" -HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ - https://github.com/cython/cython" -SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" -IUSE="emacs test" -RESTRICT="!test? ( test )" - -RDEPEND=" - emacs? ( >=app-editors/emacs-23.1:* ) -" -BDEPEND="${RDEPEND} - test? ( - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ - 'python3*') - )" - -PATCHES=( - "${FILESDIR}/cython-0.29.14-sphinx-update.patch" -) - -SITEFILE=50cython-gentoo.el - -distutils_enable_sphinx docs - -python_compile() { - # Python gets confused when it is in sys.path before build. - local -x PYTHONPATH= - - distutils-r1_python_compile -} - -python_compile_all() { - use emacs && elisp-compile Tools/cython-mode.el -} - -python_test() { - tc-export CC - # https://github.com/cython/cython/issues/1911 - local -x CFLAGS="${CFLAGS} -fno-strict-overflow" - "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \ - || die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) - distutils-r1_python_install_all - - if use emacs; then - elisp-install ${PN} Tools/cython-mode.* - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-python/cython/cython-0.29.21.ebuild b/dev-python/cython/cython-0.29.21.ebuild deleted file mode 100644 index bb017b7e2557..000000000000 --- a/dev-python/cython/cython-0.29.21.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7,8,9} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 toolchain-funcs elisp-common - -DESCRIPTION="A Python to C compiler" -HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ - https://github.com/cython/cython" -SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" -IUSE="emacs test" -RESTRICT="!test? ( test )" - -RDEPEND=" - emacs? ( >=app-editors/emacs-23.1:* ) -" -BDEPEND="${RDEPEND} - test? ( - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ - python3_{6,7,8}) - )" - -PATCHES=( - "${FILESDIR}/cython-0.29.14-sphinx-update.patch" - "${FILESDIR}/cython-0.29.21-spawn-multiprocessing.patch" -) - -SITEFILE=50cython-gentoo.el - -distutils_enable_sphinx docs - -python_compile() { - if ! python_is_python3; then - local CFLAGS="${CFLAGS} -fno-strict-aliasing" - local CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" - fi - - # Python gets confused when it is in sys.path before build. - local -x PYTHONPATH= - - distutils-r1_python_compile -} - -python_compile_all() { - use emacs && elisp-compile Tools/cython-mode.el -} - -python_test() { - tc-export CC - # https://github.com/cython/cython/issues/1911 - local -x CFLAGS="${CFLAGS} -fno-strict-overflow" - "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \ - || die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) - distutils-r1_python_install_all - - if use emacs; then - elisp-install ${PN} Tools/cython-mode.* - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-python/cython/cython-0.29.22.ebuild b/dev-python/cython/cython-0.29.22.ebuild deleted file mode 100644 index 0806d6415bb0..000000000000 --- a/dev-python/cython/cython-0.29.22.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7..9} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 toolchain-funcs elisp-common - -DESCRIPTION="A Python to C compiler" -HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ - https://github.com/cython/cython" -SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" -IUSE="emacs test" -RESTRICT="!test? ( test )" - -RDEPEND=" - emacs? ( >=app-editors/emacs-23.1:* ) -" -BDEPEND="${RDEPEND} - test? ( - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ - 'python3*') - )" - -PATCHES=( - "${FILESDIR}/${PN}-0.29.14-sphinx-update.patch" - "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" -) - -SITEFILE=50cython-gentoo.el - -distutils_enable_sphinx docs - -python_compile() { - # Python gets confused when it is in sys.path before build. - local -x PYTHONPATH= - - distutils-r1_python_compile -} - -python_compile_all() { - use emacs && elisp-compile Tools/cython-mode.el -} - -python_test() { - tc-export CC - # https://github.com/cython/cython/issues/1911 - local -x CFLAGS="${CFLAGS} -fno-strict-overflow" - "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \ - || die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) - distutils-r1_python_install_all - - if use emacs; then - elisp-install ${PN} Tools/cython-mode.* - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-python/cython/cython-0.29.23.ebuild b/dev-python/cython/cython-0.29.23.ebuild deleted file mode 100644 index bce6983a00f2..000000000000 --- a/dev-python/cython/cython-0.29.23.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7..10} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 toolchain-funcs elisp-common - -DESCRIPTION="A Python to C compiler" -HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ - https://github.com/cython/cython" -SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" -IUSE="emacs test" -RESTRICT="!test? ( test )" - -RDEPEND=" - emacs? ( >=app-editors/emacs-23.1:* ) -" -BDEPEND="${RDEPEND} - test? ( - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ - 'python3*') - )" - -PATCHES=( - "${FILESDIR}/${PN}-0.29.14-sphinx-update.patch" - "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" - "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" - "${FILESDIR}/${PN}-0.29.23-tracing-py310.patch" -) - -SITEFILE=50cython-gentoo.el - -distutils_enable_sphinx docs - -python_compile() { - # Python gets confused when it is in sys.path before build. - local -x PYTHONPATH= - - distutils-r1_python_compile -} - -python_compile_all() { - use emacs && elisp-compile Tools/cython-mode.el -} - -python_test() { - tc-export CC - # https://github.com/cython/cython/issues/1911 - local -x CFLAGS="${CFLAGS} -fno-strict-overflow" - "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \ - || die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) - distutils-r1_python_install_all - - if use emacs; then - elisp-install ${PN} Tools/cython-mode.* - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-python/cython/cython-0.29.24.ebuild b/dev-python/cython/cython-0.29.24.ebuild deleted file mode 100644 index 2dc83aee957e..000000000000 --- a/dev-python/cython/cython-0.29.24.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{7..10} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 toolchain-funcs elisp-common - -DESCRIPTION="A Python to C compiler" -HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ - https://github.com/cython/cython" -SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" -IUSE="emacs test" -RESTRICT="!test? ( test )" - -RDEPEND=" - emacs? ( >=app-editors/emacs-23.1:* ) -" -BDEPEND="${RDEPEND} - test? ( - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ - 'python3*') - )" - -PATCHES=( - "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" - "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" -) - -SITEFILE=50cython-gentoo.el - -distutils_enable_sphinx docs - -python_compile() { - # Python gets confused when it is in sys.path before build. - local -x PYTHONPATH= - - distutils-r1_python_compile -} - -python_compile_all() { - use emacs && elisp-compile Tools/cython-mode.el -} - -python_test() { - tc-export CC - # https://github.com/cython/cython/issues/1911 - local -x CFLAGS="${CFLAGS} -fno-strict-overflow" - "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests || - die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) - distutils-r1_python_install_all - - if use emacs; then - elisp-install ${PN} Tools/cython-mode.* - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-python/cython/cython-3.0.10.ebuild b/dev-python/cython/cython-3.0.10.ebuild new file mode 100644 index 000000000000..4ca5a857b629 --- /dev/null +++ b/dev-python/cython/cython-3.0.10.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{10..12} ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 multiprocessing toolchain-funcs + +MY_P=${P/_rc/rc} +DESCRIPTION="A Python to C compiler" +HOMEPAGE=" + https://cython.org/ + https://github.com/cython/cython/ + https://pypi.org/project/Cython/ +" +SRC_URI=" + https://github.com/cython/cython/archive/${PV/_rc/rc}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + <dev-python/numpy-2[${PYTHON_USEDEP}] + ' "${PYTHON_TESTED[@]}") + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" + "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" + "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch" +) + +distutils_enable_sphinx docs \ + dev-python/jinja \ + dev-python/sphinx-issues \ + dev-python/sphinx-tabs + +python_compile() { + # Python gets confused when it is in sys.path before build. + local -x PYTHONPATH= + + distutils-r1_python_compile +} + +python_test() { + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON} (xfail)" + return + fi + + # Needed to avoid confusing cache tests + unset CYTHON_FORCE_REGEN + + tc-export CC + # https://github.com/cython/cython/issues/1911 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow" + "${PYTHON}" runtests.py \ + -vv \ + -j "$(makeopts_jobs)" \ + --work-dir "${BUILD_DIR}"/tests \ + --no-examples \ + --no-code-style \ + || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) + distutils-r1_python_install_all +} diff --git a/dev-python/cython/cython-3.0.8.ebuild b/dev-python/cython/cython-3.0.8.ebuild new file mode 100644 index 000000000000..65a4fd8e36be --- /dev/null +++ b/dev-python/cython/cython-3.0.8.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{10..12} ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 multiprocessing toolchain-funcs + +MY_P=${P/_rc/rc} +DESCRIPTION="A Python to C compiler" +HOMEPAGE=" + https://cython.org/ + https://github.com/cython/cython/ + https://pypi.org/project/Cython/ +" +SRC_URI=" + https://github.com/cython/cython/archive/${PV/_rc/rc}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ' "${PYTHON_TESTED[@]}") + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" + "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" + "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch" +) + +distutils_enable_sphinx docs \ + dev-python/jinja \ + dev-python/sphinx-issues \ + dev-python/sphinx-tabs + +python_compile() { + # Python gets confused when it is in sys.path before build. + local -x PYTHONPATH= + + distutils-r1_python_compile +} + +python_test() { + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON} (xfail)" + return + fi + + # Needed to avoid confusing cache tests + unset CYTHON_FORCE_REGEN + + tc-export CC + # https://github.com/cython/cython/issues/1911 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow" + "${PYTHON}" runtests.py \ + -vv \ + -j "$(makeopts_jobs)" \ + --work-dir "${BUILD_DIR}"/tests \ + --no-examples \ + --no-code-style \ + || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) + distutils-r1_python_install_all +} diff --git a/dev-python/cython/cython-3.0.9.ebuild b/dev-python/cython/cython-3.0.9.ebuild new file mode 100644 index 000000000000..3b1f0323887f --- /dev/null +++ b/dev-python/cython/cython-3.0.9.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{10..12} ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 multiprocessing toolchain-funcs + +MY_P=${P/_rc/rc} +DESCRIPTION="A Python to C compiler" +HOMEPAGE=" + https://cython.org/ + https://github.com/cython/cython/ + https://pypi.org/project/Cython/ +" +SRC_URI=" + https://github.com/cython/cython/archive/${PV/_rc/rc}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ' "${PYTHON_TESTED[@]}") + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" + "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" + "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch" +) + +distutils_enable_sphinx docs \ + dev-python/jinja \ + dev-python/sphinx-issues \ + dev-python/sphinx-tabs + +python_compile() { + # Python gets confused when it is in sys.path before build. + local -x PYTHONPATH= + + distutils-r1_python_compile +} + +python_test() { + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON} (xfail)" + return + fi + + # Needed to avoid confusing cache tests + unset CYTHON_FORCE_REGEN + + tc-export CC + # https://github.com/cython/cython/issues/1911 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow" + "${PYTHON}" runtests.py \ + -vv \ + -j "$(makeopts_jobs)" \ + --work-dir "${BUILD_DIR}"/tests \ + --no-examples \ + --no-code-style \ + || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) + distutils-r1_python_install_all +} diff --git a/dev-python/cython/files/50cython-gentoo.el b/dev-python/cython/files/50cython-gentoo.el deleted file mode 100644 index e6dcc6a6d7fb..000000000000 --- a/dev-python/cython/files/50cython-gentoo.el +++ /dev/null @@ -1,11 +0,0 @@ -;;; site-lisp configuration for cython-mode - -(add-to-list 'load-path "@SITELISP@") - -(autoload 'cython-mode "cython-mode" "Major mode for editing Cython files" t) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode)) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode)) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode)) diff --git a/dev-python/cython/files/cython-0.29.14-sphinx-update.patch b/dev-python/cython/files/cython-0.29.14-sphinx-update.patch deleted file mode 100644 index 3f426754f6f1..000000000000 --- a/dev-python/cython/files/cython-0.29.14-sphinx-update.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/docs/conf.py b/docs/conf.py -index 10662e28c..a84e0b928 100644 ---- a/docs/conf.py -+++ b/docs/conf.py -@@ -41,7 +41,7 @@ highlight_language = 'cython' - extensions = [ - 'ipython_console_highlighting', - 'cython_highlighting', -- 'sphinx.ext.pngmath', -+ 'sphinx.ext.imgmath', - 'sphinx.ext.todo', - 'sphinx.ext.intersphinx', - 'sphinx.ext.autodoc' diff --git a/dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch b/dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch deleted file mode 100644 index 0aa7212b9a34..000000000000 --- a/dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch +++ /dev/null @@ -1,29 +0,0 @@ -Needed to prevent a loop while calling cythonize on macOS - or any platform -defaulting to the 'spawn' method, as Python 3.8 does on Darwin. - -https://github.com/cython/cython/pull/3263 -From 15ae78bb74a856836dd64828326f4f0812d36520 Mon Sep 17 00:00:00 2001 -From: Marcel Bargull <marcel.bargull@udo.edu> -Date: Fri, 6 Dec 2019 18:21:19 +0100 -Subject: [PATCH] Disable parallel cythonization for "spawn" start method. - ---- - Cython/Build/Dependencies.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py -index 593e00a6ef..f9b9c15bc5 100644 ---- a/Cython/Build/Dependencies.py -+++ b/Cython/Build/Dependencies.py -@@ -1073,6 +1073,11 @@ def copy_to_build_dir(filepath, root=os.getcwd()): - - if N <= 1: - nthreads = 0 -+ if nthreads: -+ import multiprocessing -+ if multiprocessing.get_start_method() == 'spawn': -+ print('Disabling parallel cythonization for "spawn" process start method.') -+ nthreads = 0 - if nthreads: - import multiprocessing - pool = multiprocessing.Pool( diff --git a/dev-python/cython/files/cython-0.29.23-pythran-parallel-install.patch b/dev-python/cython/files/cython-0.29.23-pythran-parallel-install.patch new file mode 100644 index 000000000000..450007b5663f --- /dev/null +++ b/dev-python/cython/files/cython-0.29.23-pythran-parallel-install.patch @@ -0,0 +1,20 @@ +An empty directory in site-packages is a valid Python module, unfortunately, because +of namespaces. If installing packages in parallel, the pythran module might "exist" +but be empty (hence no __version__ attribute). Catch AttributeError to avoid a narrow +race. + +See https://bugs.gentoo.org/902713. + +This might still be a Portage issue if there's a substantial delay between creating +the directory and installing the remaining files though. +--- a/Cython/Compiler/Pythran.py ++++ b/Cython/Compiler/Pythran.py +@@ -10,7 +10,7 @@ try: + import pythran + pythran_is_pre_0_9 = tuple(map(int, pythran.__version__.split('.')[0:2])) < (0, 9) + pythran_is_pre_0_9_6 = tuple(map(int, pythran.__version__.split('.')[0:3])) < (0, 9, 6) +-except ImportError: ++except (AttributeError, ImportError): + pythran = None + pythran_is_pre_0_9 = True + pythran_is_pre_0_9_6 = True diff --git a/dev-python/cython/files/cython-0.29.23-tracing-py310.patch b/dev-python/cython/files/cython-0.29.23-tracing-py310.patch deleted file mode 100644 index ff0e45a646dc..000000000000 --- a/dev-python/cython/files/cython-0.29.23-tracing-py310.patch +++ /dev/null @@ -1,213 +0,0 @@ -From c9cccfeaf3f0e20c2bb14fc234e86f4fc8e4fe81 Mon Sep 17 00:00:00 2001 -From: Stefan Behnel <stefan_ml@behnel.de> -Date: Fri, 14 May 2021 19:39:58 +0200 -Subject: [PATCH] Adapt tracing code to Py3.10 beta 1. - ---- - Cython/Utility/Profile.c | 79 +++++++++++++++++++++++++--------------- - 1 file changed, 49 insertions(+), 30 deletions(-) - -diff --git a/Cython/Utility/Profile.c b/Cython/Utility/Profile.c -index 15ceb41cc2..2cd9af9da7 100644 ---- a/Cython/Utility/Profile.c -+++ b/Cython/Utility/Profile.c -@@ -47,13 +47,32 @@ - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - -- #define __Pyx_TraceDeclarations \ -- static PyCodeObject *$frame_code_cname = NULL; \ -- CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ -- int __Pyx_use_tracing = 0; -+ #define __Pyx_TraceDeclarations \ -+ static PyCodeObject *$frame_code_cname = NULL; \ -+ CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ -+ int __Pyx_use_tracing = 0; - -- #define __Pyx_TraceFrameInit(codeobj) \ -- if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj; -+ #define __Pyx_TraceFrameInit(codeobj) \ -+ if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj; -+ -+#if PY_VERSION_HEX >= 0x030a00b1 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ -+ (unlikely(tstate->cframe->use_tracing) && \ -+ (!(check_tracing) || !tstate->tracing) && \ -+ (!(check_funcs) || tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) -+ -+ #define __Pyx_SetTracing(tstate, enable) \ -+ (tstate)->cframe->use_tracing = (enable) -+ -+#else -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ -+ (unlikely(tstate->use_tracing) && \ -+ (!(check_tracing) || !tstate->tracing) && \ -+ (!(check_funcs) || tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) -+ -+ #define __Pyx_SetTracing(tstate, enable) \ -+ (tstate)->use_tracing = (enable) -+#endif - - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ -@@ -62,8 +81,7 @@ - PyThreadState *tstate; \ - PyGILState_STATE state = PyGILState_Ensure(); \ - tstate = __Pyx_PyThreadState_Current; \ -- if (unlikely(tstate->use_tracing) && !tstate->tracing && \ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ -+ if (__Pyx_IsTracing(tstate, 1, 1)) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ - } \ - PyGILState_Release(state); \ -@@ -71,8 +89,7 @@ - } \ - } else { \ - PyThreadState* tstate = PyThreadState_GET(); \ -- if (unlikely(tstate->use_tracing) && !tstate->tracing && \ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ -+ if (__Pyx_IsTracing(tstate, 1, 1)) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ - if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ - } \ -@@ -80,8 +97,7 @@ - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ - { PyThreadState* tstate = PyThreadState_GET(); \ -- if (unlikely(tstate->use_tracing) && !tstate->tracing && \ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ -+ if (__Pyx_IsTracing(tstate, 1, 1)) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ - if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ - } \ -@@ -91,10 +107,9 @@ - #define __Pyx_TraceException() \ - if (likely(!__Pyx_use_tracing)); else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ -- if (tstate->use_tracing && \ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ -+ if (__Pyx_IsTracing(tstate, 0, 1)) { \ - tstate->tracing++; \ -- tstate->use_tracing = 0; \ -+ __Pyx_SetTracing(tstate, 0); \ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate); \ - if (exc_info) { \ - if (CYTHON_TRACE && tstate->c_tracefunc) \ -@@ -104,7 +119,7 @@ - tstate->c_profileobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ - Py_DECREF(exc_info); \ - } \ -- tstate->use_tracing = 1; \ -+ __Pyx_SetTracing(tstate, 1); \ - tstate->tracing--; \ - } \ - } -@@ -113,13 +128,13 @@ - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_SetTracing(tstate, 0); - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); -- tstate->use_tracing = 1; -+ __Pyx_SetTracing(tstate, 1); - tstate->tracing--; - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } -@@ -132,14 +147,14 @@ - PyThreadState *tstate; \ - PyGILState_STATE state = PyGILState_Ensure(); \ - tstate = __Pyx_PyThreadState_Current; \ -- if (tstate->use_tracing) { \ -+ if (__Pyx_IsTracing(tstate, 0, 0)) { \ - __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ - } \ - PyGILState_Release(state); \ - } \ - } else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ -- if (tstate->use_tracing) { \ -+ if (__Pyx_IsTracing(tstate, 0, 0)) { \ - __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ - } \ - } \ -@@ -148,7 +163,7 @@ - #define __Pyx_TraceReturn(result, nogil) \ - if (likely(!__Pyx_use_tracing)); else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ -- if (tstate->use_tracing) { \ -+ if (__Pyx_IsTracing(tstate, 0, 0)) { \ - __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ - } \ - } -@@ -176,9 +191,11 @@ - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); - tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_SetTracing(tstate, 0); -+ - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); -- tstate->use_tracing = 1; -+ -+ __Pyx_SetTracing(tstate, 1); - tstate->tracing--; - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); -@@ -199,7 +216,7 @@ - PyThreadState *tstate; \ - PyGILState_STATE state = __Pyx_PyGILState_Ensure(); \ - tstate = __Pyx_PyThreadState_Current; \ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - } \ - __Pyx_PyGILState_Release(state); \ -@@ -207,7 +224,7 @@ - } \ - } else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - if (unlikely(ret)) goto_error; \ - } \ -@@ -217,7 +234,7 @@ - #define __Pyx_TraceLine(lineno, nogil, goto_error) \ - if (likely(!__Pyx_use_tracing)); else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - if (unlikely(ret)) goto_error; \ - } \ -@@ -263,19 +280,21 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - (*frame)->f_tstate = tstate; - #endif - } -- __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); -+ __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); -+ - retval = 1; - tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_SetTracing(tstate, 0); - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); -+ - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; -- tstate->use_tracing = (tstate->c_profilefunc || -- (CYTHON_TRACE && tstate->c_tracefunc)); -+ -+ __Pyx_SetTracing(tstate, (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))); - tstate->tracing--; - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); diff --git a/dev-python/cython/metadata.xml b/dev-python/cython/metadata.xml index e9decf14f92e..4960428b8c6b 100644 --- a/dev-python/cython/metadata.xml +++ b/dev-python/cython/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>python@gentoo.org</email> |