summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-29 03:47:46 +0000
committerSam James <sam@gentoo.org>2022-01-29 03:56:10 +0000
commit35ac84a56229e19b5c2d684bb03484ea5f34e60a (patch)
treec7ff4aba1f80449c9a30ba712a4b573b5d844f08 /dev-python/cython
parentapp-accessibility/espeak-ng: run tests serially (diff)
downloadgentoo-35ac84a56229e19b5c2d684bb03484ea5f34e60a.tar.gz
gentoo-35ac84a56229e19b5c2d684bb03484ea5f34e60a.tar.bz2
gentoo-35ac84a56229e19b5c2d684bb03484ea5f34e60a.zip
dev-python/cython: add 0.29.27
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/cython')
-rw-r--r--dev-python/cython/Manifest1
-rw-r--r--dev-python/cython/cython-0.29.27.ebuild76
2 files changed, 77 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index deb61b54af02..1fa77d1c0d04 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -1,2 +1,3 @@
DIST cython-0.29.25.gh.tar.gz 2100012 BLAKE2B 497c2550c870c808f1c972d3e9ffedd6672544b9976653faac4a4125008e4472ae5a2e0db0510c8b2c5fd11f73a5885e0e4394bbce2f1327b7610bf59b64f640 SHA512 1d655bb4de8bd3480bcd579c32cd0e5bfc5cfc3d966d3d892b98cc86f59c9bd0522066c4c5dbc4c6abeb3ebe3fcd3f49ec873dd724f9ad04976635f652fdf9e3
DIST cython-0.29.26.gh.tar.gz 2100616 BLAKE2B 9990d8fd14a8042b1a27a4f60fcc8f6d4be42a1e475f0e5d37bc6c60439ca00a1a70b49ab708ad2dfac5184a62c25d75f27ff158ef7f0df9132355c570a9aac6 SHA512 936449dd0031c2e2baeb4402a448d632324c1b66bf062ae0e632cf63dc27556607efb8446e8f913253b761627d3946283c2a60fdcad8c2434e1601fe4b0fb60e
+DIST cython-0.29.27.gh.tar.gz 2101169 BLAKE2B ebc56ced8fdf61b3be9f9abe44f71ce6b243e002ac4992dbf3a0f58331c00a0d18498190b50cba921351a38c27cf410bbc3e6b146ca3e73b829f0292fa87eebf SHA512 ca9ef31a662b6971c437a3e8c931d8e000fc6a55b3afbb317588944f365d903676b2a394ecfdb2da0190bdad84d1daf699662b95a68f4008e78e31bab4085b66
diff --git a/dev-python/cython/cython-0.29.27.ebuild b/dev-python/cython/cython-0.29.27.ebuild
new file mode 100644
index 000000000000..727f6f9e3499
--- /dev/null
+++ b/dev-python/cython/cython-0.29.27.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+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 ~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*')
+ )"
+
+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
+}