diff options
author | Sam James <sam@gentoo.org> | 2023-05-24 10:16:52 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-24 10:18:32 +0100 |
commit | 4196458af282fc5ad7814be8bbd0ee1e29cd8cdd (patch) | |
tree | 524fe645d1f4e108f1d7d82883c7b1520b581dfb | |
parent | mail-mta/postfix: add 3.9_pre20230523, drop 3.9_pre20230521 (diff) | |
download | gentoo-4196458af282fc5ad7814be8bbd0ee1e29cd8cdd.tar.gz gentoo-4196458af282fc5ad7814be8bbd0ee1e29cd8cdd.tar.bz2 gentoo-4196458af282fc5ad7814be8bbd0ee1e29cd8cdd.zip |
dev-python/cython: add 0.29.35 (+ parallel tests, + un-XFAIL py3.11)
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dev-python/cython/Manifest | 1 | ||||
-rw-r--r-- | dev-python/cython/cython-0.29.35.ebuild | 92 |
2 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest index 46dd0ff7bd3c..d54f2ec4e652 100644 --- a/dev-python/cython/Manifest +++ b/dev-python/cython/Manifest @@ -1,3 +1,4 @@ DIST cython-0.29.33.gh.tar.gz 2113910 BLAKE2B 9212edfa36680a3243632d28c4f5616a7336e82ee1f96df7d5e29711056619639c9a8fe9bbf9aea0a86aed39e836dc6eaa112ad35080f530add6309ccd09c53c SHA512 85f5ba7159d8793dbda980140b26086727f356a71d78f8522419657841d07b865d09c2f0a0f77d398669d071c1d261060235321a19eb7808e35d24f8ac71560d DIST cython-0.29.34.gh.tar.gz 2114639 BLAKE2B c5f70fd3e6074d9030a1035bc98d71b703e0f391b61bd91f3ffba2c35a29a98b9ff8ef2047e7c75743ead280f0f06a924abe84ae8bf7696b65da662a3c58ee0c SHA512 51679d1304d0f87dfb51e60c753f1ce60027f855a91cf130a5dcf84353884a7dcf09c01701945ae2f9173f8f095890c377d5faac28c2f01d7f764609c0130411 +DIST cython-0.29.35.gh.tar.gz 2115190 BLAKE2B ac23abbd2b560ee52a79840d995a4cf36ddb3a8705b9327010f1ad6add8028185c15703efcc1d59b581d65b5de38e123c0f07c36fe6ffe54a6efee7512161344 SHA512 35d679d94e1f731e004b83fb4ae0d569703b0800c913012308146b1c54463ce12cb1cf3733e24162fb357f179444c5ca31108a37850e6c749ddebac5175119f5 DIST cython-3.0.0b2.gh.tar.gz 2669448 BLAKE2B 87602a43f77f8005adfc71ec0598a12212db917071dd2ae9a7d0d909411e38525290d860a8606600a5e1b07b014da65d2398f04818837fb15f66bcdba0cad965 SHA512 2095a556bc83669a89902a71da2164fbfab2b75cec2de95c91f95b6b3639bc5802b09808059896ed564b0d6e0539e497051614572bc8ba5d678d0410ccc3914f diff --git a/dev-python/cython/cython-0.29.35.ebuild b/dev-python/cython/cython-0.29.35.ebuild new file mode 100644 index 000000000000..756121234252 --- /dev/null +++ b/dev-python/cython/cython-0.29.35.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 multiprocessing 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 ~arm64-macos ~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_{10..11}) + ) +" + +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; 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 -j "$(makeopts_jobs)" --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 +} |