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