diff options
Diffstat (limited to 'dev-python/cython')
-rw-r--r-- | dev-python/cython/Manifest | 4 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.33-r1.ebuild | 91 | ||||
-rw-r--r-- | dev-python/cython/cython-3.0.0_beta1-r1.ebuild (renamed from dev-python/cython/cython-3.0.0_beta1.ebuild) | 0 | ||||
-rw-r--r-- | dev-python/cython/files/cython-0.29.23-pythran-parallel-install.patch | 20 |
4 files changed, 114 insertions, 1 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest index b4c15b5e352b..f45002c84b75 100644 --- a/dev-python/cython/Manifest +++ b/dev-python/cython/Manifest @@ -1,10 +1,12 @@ AUX 50cython-gentoo.el 388 BLAKE2B 5bc38190b467efa9e7be1a5831022534dbfdc02206fca34f39bb2c897aa50cdebf960589181a9614a50829c380a892a9013e8ec5f538d51f52475cb8d92fdb5b SHA512 dd554d0d6cc220988552b06a20337af20b847e75bee76c90eb92ea979d9c2ae9d64ffa849266ff403d857b3737981de451bf40061bea0533600476bc57661c18 AUX cython-0.29.22-spawn-multiprocessing.patch 963 BLAKE2B ebbc3f6f4fa88e7e082326bccbad328724a4ff5645f0b2aa28f21419044b17bed8495618bb980b23a99310c2b6ef275331e1b9aa6d734017eb33646c92a07a73 SHA512 3f5c6b4108b87cf3014416386095c07ac91762152bbd87e8bd589177d40b933c11e19610bea06720c5c70f76b5b9b70d27e5c3cfa20eed30deaaf7d122910bd3 +AUX cython-0.29.23-pythran-parallel-install.patch 874 BLAKE2B 39286ee98427260ce6ec077a750e0a1412445343fd11be9d96d8ab65b7d9789c5f1864cb9a1b3565ee3f51e117ecc854ebacc39dc32917fc72f36340c2d7f0a1 SHA512 8b78755288d3f165d962a5a1be9492d609a8e3dab10197b271c84ed0c4b7006053038e68f18bbb4204e6acba83e3f72ffeabf57ffa03f4a08f28b65db3cfd854 AUX cython-0.29.23-test_exceptions-py310.patch 656 BLAKE2B 6c650c85d01b8bf367528d144cd967fa9def94634e35763e2e7a1c3e5afa2b01d0c84694024dde6e45577eee223f6464b5f88ab971d207d35892edf347a0c08f SHA512 d8f7f770a0b3303552deec0e7d3f9258de1edcd384f4b2c3881634fd21ce847a3d974e9142d1ed2fbe3a549e65292c6690be3a36ab4de52d0593d9831dc2f7ce DIST cython-0.29.32.gh.tar.gz 2110417 BLAKE2B 008ffe325c87d165bf45afb2ff92db5286f611bbe425d0e9f18b530202135ca21f5f5ab564a4d0c6251ec2479ea0fd19207274a255fb1faf8863d3b067d17ae9 SHA512 55462792fa70d8edf60aa470627ab494918d7297fd7d282a7a54da76ee5a180233108404a1c8f3d79f6408f19b6e4f46b36e59fd47c38ede24f061f374437b6f DIST cython-0.29.33.gh.tar.gz 2113910 BLAKE2B 9212edfa36680a3243632d28c4f5616a7336e82ee1f96df7d5e29711056619639c9a8fe9bbf9aea0a86aed39e836dc6eaa112ad35080f530add6309ccd09c53c SHA512 85f5ba7159d8793dbda980140b26086727f356a71d78f8522419657841d07b865d09c2f0a0f77d398669d071c1d261060235321a19eb7808e35d24f8ac71560d DIST cython-3.0.0b1.gh.tar.gz 2659132 BLAKE2B 7ed252d90f71521f24817e064f1b55f671185053cdd46214fb14f2b6e16dbfbc46e87659681ead40a32bb0506150ae6b8cdbaceae7667811aa81f97a39b5efcc SHA512 a7b2e9c22d19eab9e4ad551895e5c8882a7098a52865e341fd84d902124b4599d193d202333d9f1ffd5354fff62637c65d124820e6721905edaed46b5881b14c EBUILD cython-0.29.32.ebuild 1989 BLAKE2B 57cc0e23f5ec7feaa5a697e6807b37003cbaa6b7be1757ff607c6591dfc39a5f7e1e0e016630f47f9f7a8cb6b235682952a894f1a2cdcad2d2f9aabef98a39e2 SHA512 ba986bf5401dc05f204270e03a4b3f911721f5e94a79bcd1c714c8a0956affe7919bae01c433ade3b84ab22a823c7c61af95b8364470781c430dd6b125244886 +EBUILD cython-0.29.33-r1.ebuild 2057 BLAKE2B 8af23e87ae4cb9e2ea8b53931b995b039f643a0644774d7d50fad73287b71b53f1586a81902a4c401f01230605b066113721996ffc2af0fd12a4fa29c9e0c3e7 SHA512 d8595d75b5c0beaf168b96747637144ce1f13d98c7682991b04337e1578c955d6b0e33875ec0bd31094962bf1c7c7f8efe512445e401985c4c559191f5fd6c06 EBUILD cython-0.29.33.ebuild 1993 BLAKE2B 4c04089a895df409424ba49ed5fb6c09c1dba424e3a58f478d8d198f4ee732c598dd495a3fb65d96425dff7a09d8c3b3bcc271eec7b96f9bc746d7e13c3575b3 SHA512 9f1014f3070b6a079ccda7b13d58912c6e9b86bc3f8caef8ecac6508dfa5c58e500bcd68feb50af4fa6cda983d438660ffc297313f0431255c48865b2eba3aa9 -EBUILD cython-3.0.0_beta1.ebuild 2121 BLAKE2B ced4f51629663e7a8237996c7627123c30ca26f7492cfcbe63539f29646a75bed8f265b4e14ea6fca648ced5865ab666e31ae15dd31e1a95889269cf05703517 SHA512 928c1faa04105265373cb4177579f237d52abe104bd49800dc1bd31df432bc03e2d03af7de87604b6eba0ec5d429deea1c19c92719903f4732d033709df68bca +EBUILD cython-3.0.0_beta1-r1.ebuild 2121 BLAKE2B ced4f51629663e7a8237996c7627123c30ca26f7492cfcbe63539f29646a75bed8f265b4e14ea6fca648ced5865ab666e31ae15dd31e1a95889269cf05703517 SHA512 928c1faa04105265373cb4177579f237d52abe104bd49800dc1bd31df432bc03e2d03af7de87604b6eba0ec5d429deea1c19c92719903f4732d033709df68bca MISC metadata.xml 606 BLAKE2B 1ee3fc75852383aa0618afeb7521c3ae0e95b518c85b2c58ff958905092cf68017d313a09d25031a50b649f9dd1b452e751036f2552df9d91447baaeff0a8f0b SHA512 b7917c2e417cee9e59c8011246f7223f5095c87f0294ea140dbfc8fda0b09cf61c9f055380a9d3f74a07e71bb49d75f219d6224ea95f1f4d4b451e5688c13f78 diff --git a/dev-python/cython/cython-0.29.33-r1.ebuild b/dev-python/cython/cython-0.29.33-r1.ebuild new file mode 100644 index 000000000000..75535976ff9b --- /dev/null +++ b/dev-python/cython/cython-0.29.33-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 toolchain-funcs elisp-common + +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}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~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_{8..10}) + ) +" + +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" +) + +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() { + if has "${EPYTHON}" pypy3 python3.11; then + einfo "Skipping tests on ${EPYTHON} (xfail)" + return + fi + + 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.0_beta1.ebuild b/dev-python/cython/cython-3.0.0_beta1-r1.ebuild index 54bc5b850f4d..54bc5b850f4d 100644 --- a/dev-python/cython/cython-3.0.0_beta1.ebuild +++ b/dev-python/cython/cython-3.0.0_beta1-r1.ebuild 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 |