Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/
Date: Sat, 29 Jan 2022 03:56:25
Message-Id: 1643428570.35ac84a56229e19b5c2d684bb03484ea5f34e60a.sam@gentoo
1 commit: 35ac84a56229e19b5c2d684bb03484ea5f34e60a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 29 03:47:46 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 03:56:10 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35ac84a5
7
8 dev-python/cython: add 0.29.27
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-python/cython/Manifest | 1 +
13 dev-python/cython/cython-0.29.27.ebuild | 76 +++++++++++++++++++++++++++++++++
14 2 files changed, 77 insertions(+)
15
16 diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
17 index deb61b54af02..1fa77d1c0d04 100644
18 --- a/dev-python/cython/Manifest
19 +++ b/dev-python/cython/Manifest
20 @@ -1,2 +1,3 @@
21 DIST cython-0.29.25.gh.tar.gz 2100012 BLAKE2B 497c2550c870c808f1c972d3e9ffedd6672544b9976653faac4a4125008e4472ae5a2e0db0510c8b2c5fd11f73a5885e0e4394bbce2f1327b7610bf59b64f640 SHA512 1d655bb4de8bd3480bcd579c32cd0e5bfc5cfc3d966d3d892b98cc86f59c9bd0522066c4c5dbc4c6abeb3ebe3fcd3f49ec873dd724f9ad04976635f652fdf9e3
22 DIST cython-0.29.26.gh.tar.gz 2100616 BLAKE2B 9990d8fd14a8042b1a27a4f60fcc8f6d4be42a1e475f0e5d37bc6c60439ca00a1a70b49ab708ad2dfac5184a62c25d75f27ff158ef7f0df9132355c570a9aac6 SHA512 936449dd0031c2e2baeb4402a448d632324c1b66bf062ae0e632cf63dc27556607efb8446e8f913253b761627d3946283c2a60fdcad8c2434e1601fe4b0fb60e
23 +DIST cython-0.29.27.gh.tar.gz 2101169 BLAKE2B ebc56ced8fdf61b3be9f9abe44f71ce6b243e002ac4992dbf3a0f58331c00a0d18498190b50cba921351a38c27cf410bbc3e6b146ca3e73b829f0292fa87eebf SHA512 ca9ef31a662b6971c437a3e8c931d8e000fc6a55b3afbb317588944f365d903676b2a394ecfdb2da0190bdad84d1daf699662b95a68f4008e78e31bab4085b66
24
25 diff --git a/dev-python/cython/cython-0.29.27.ebuild b/dev-python/cython/cython-0.29.27.ebuild
26 new file mode 100644
27 index 000000000000..727f6f9e3499
28 --- /dev/null
29 +++ b/dev-python/cython/cython-0.29.27.ebuild
30 @@ -0,0 +1,76 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{7..10} pypy3 )
38 +PYTHON_REQ_USE="threads(+)"
39 +
40 +inherit distutils-r1 toolchain-funcs elisp-common
41 +
42 +DESCRIPTION="A Python to C compiler"
43 +HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
44 + https://github.com/cython/cython"
45 +SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
46 +
47 +LICENSE="Apache-2.0"
48 +SLOT="0"
49 +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"
50 +IUSE="emacs test"
51 +RESTRICT="!test? ( test )"
52 +
53 +RDEPEND="
54 + emacs? ( >=app-editors/emacs-23.1:* )
55 +"
56 +BDEPEND="${RDEPEND}
57 + test? (
58 + $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
59 + 'python3*')
60 + )"
61 +
62 +PATCHES=(
63 + "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
64 + "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
65 +)
66 +
67 +SITEFILE=50cython-gentoo.el
68 +
69 +distutils_enable_sphinx docs
70 +
71 +python_compile() {
72 + # Python gets confused when it is in sys.path before build.
73 + local -x PYTHONPATH=
74 +
75 + distutils-r1_python_compile
76 +}
77 +
78 +python_compile_all() {
79 + use emacs && elisp-compile Tools/cython-mode.el
80 +}
81 +
82 +python_test() {
83 + tc-export CC
84 + # https://github.com/cython/cython/issues/1911
85 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
86 + "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests ||
87 + die "Tests fail with ${EPYTHON}"
88 +}
89 +
90 +python_install_all() {
91 + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
92 + distutils-r1_python_install_all
93 +
94 + if use emacs; then
95 + elisp-install ${PN} Tools/cython-mode.*
96 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
97 + fi
98 +}
99 +
100 +pkg_postinst() {
101 + use emacs && elisp-site-regen
102 +}
103 +
104 +pkg_postrm() {
105 + use emacs && elisp-site-regen
106 +}