Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/
Date: Sat, 02 Feb 2019 10:31:18
Message-Id: 1549103465.dabeae7b0f49e91249499648989bec52be00f098.mgorny@gentoo
1 commit: dabeae7b0f49e91249499648989bec52be00f098
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 2 07:19:11 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 2 10:31:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dabeae7b
7
8 dev-python/cython: Bump to 0.29.4
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/cython/Manifest | 1 +
13 dev-python/cython/cython-0.29.4.ebuild | 86 ++++++++++++++++++++++++++++++++++
14 2 files changed, 87 insertions(+)
15
16 diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
17 index 904c609606c..6e8e87204a0 100644
18 --- a/dev-python/cython/Manifest
19 +++ b/dev-python/cython/Manifest
20 @@ -3,3 +3,4 @@ DIST Cython-0.26.1.tar.gz 1725133 BLAKE2B b2c0433e8154ad76d921677608cae42a793326
21 DIST Cython-0.28.4.tar.gz 1880943 BLAKE2B a97314147294c95fa0bd6d3fa1a1315d81f8abb46a1f2196009c1ef6f0dd7f47f81a7b31ab81d1fd00e8de37878a18a22d225055181ee74ffe4cc8105d84cd75 SHA512 67d2da2d776fc02193cfe98c8942e93905ec5e30bf4e0f9d5c965d930a034936d4c29c8248fccefff5db6d4dee054ec854994bea63fa3f64ff65df7550997c29
22 DIST Cython-0.29.2.tar.gz 2041500 BLAKE2B 9edf4297e55b5de438fb79bdbfb4b1468af8b72e5556b38b9349b84fd9b917a56bc295b11e2c8938984fbd47099d4938450fac225c94687c1b3dab2749f72232 SHA512 d553dbb35b0841ca64d03fae3157e3a46248f16f14a1b75bbae979ca74a5fa89f85fa254a442a34314fe385d0aef7afa8c75b7f82662b37f7eeccd82e1404603
23 DIST Cython-0.29.3.tar.gz 2042466 BLAKE2B 6ea5b59d99875c65afb041b8ea091d7d5b191504bcbe247eb770d5696607b69df6c3565235fdb523824629011058eec22417ea0c0a1031c30876170559add4d7 SHA512 b23a8a1a05f40ad69c740b93d5372e920ab69f586d5109b119d9c4d72a3d95fa4f9ecb13a4f18bc93b474d385b5c8db002dd1ffe03e5b040612958556283a940
24 +DIST Cython-0.29.4.tar.gz 2044382 BLAKE2B b36d27706a3270805f66190a4cf2735eaf20b1b932365b324a433c0e58e63e860ce1500333233c3539ae697886ac0adc361a2c158d5d064a3ea05843debc3f26 SHA512 8f115e36975aaf64eda4df8b0a85378d0c80b3292dbd162be826b939def03bdc9f3eb937676e2367003c2944b570d97f50d7880becfdb2fdc5144077b4a722dc
25
26 diff --git a/dev-python/cython/cython-0.29.4.ebuild b/dev-python/cython/cython-0.29.4.ebuild
27 new file mode 100644
28 index 00000000000..dac33af5969
29 --- /dev/null
30 +++ b/dev-python/cython/cython-0.29.4.ebuild
31 @@ -0,0 +1,86 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
38 +PYTHON_REQ_USE="threads(+)"
39 +
40 +inherit distutils-r1 toolchain-funcs elisp-common
41 +
42 +MY_PN="Cython"
43 +MY_P="${MY_PN}-${PV/_/}"
44 +
45 +DESCRIPTION="A Python to C compiler"
46 +HOMEPAGE="http://cython.org https://pypi.org/project/Cython/"
47 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
48 +
49 +LICENSE="Apache-2.0"
50 +SLOT="0"
51 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
52 +
53 +IUSE="doc emacs test"
54 +
55 +RDEPEND="
56 + emacs? ( virtual/emacs )
57 +"
58 +DEPEND="${RDEPEND}
59 + dev-python/setuptools[${PYTHON_USEDEP}]
60 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
61 + test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
62 +
63 +SITEFILE=50cython-gentoo.el
64 +S="${WORKDIR}/${MY_PN}-${PV%_*}"
65 +
66 +python_prepare_all() {
67 + # tests behavior that is illegal in Python 3.7+
68 + # https://github.com/cython/cython/issues/2454
69 + sed -i -e '/with_outer_raising/,/return/d' tests/run/generators_py.py || die
70 +
71 + distutils-r1_python_prepare_all
72 +}
73 +
74 +python_compile() {
75 + if ! python_is_python3; then
76 + local CFLAGS="${CFLAGS} -fno-strict-aliasing"
77 + local CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
78 + fi
79 +
80 + # Python gets confused when it is in sys.path before build.
81 + local -x PYTHONPATH=
82 +
83 + distutils-r1_python_compile
84 +}
85 +
86 +python_compile_all() {
87 + use emacs && elisp-compile Tools/cython-mode.el
88 +
89 + use doc && emake -C docs html
90 +}
91 +
92 +python_test() {
93 + tc-export CC
94 + # https://github.com/cython/cython/issues/1911
95 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
96 + "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
97 + || die "Tests fail with ${EPYTHON}"
98 +}
99 +
100 +python_install_all() {
101 + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
102 + use doc && local HTML_DOCS=( docs/build/html/. )
103 + distutils-r1_python_install_all
104 +
105 + if use emacs; then
106 + elisp-install ${PN} Tools/cython-mode.*
107 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
108 + fi
109 +}
110 +
111 +pkg_postinst() {
112 + use emacs && elisp-site-regen
113 +}
114 +
115 +pkg_postrm() {
116 + use emacs && elisp-site-regen
117 +}