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: Mon, 28 Sep 2020 15:53:31
Message-Id: 1601308365.fe2a7a066ca1db027b6f86eebf46e493c78923eb.mgorny@gentoo
1 commit: fe2a7a066ca1db027b6f86eebf46e493c78923eb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 27 21:42:50 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 28 15:52:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe2a7a06
7
8 dev-python/cython: Remove py2.7 in revbump
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/cython/cython-0.29.21-r1.ebuild | 75 ++++++++++++++++++++++++++++++
13 1 file changed, 75 insertions(+)
14
15 diff --git a/dev-python/cython/cython-0.29.21-r1.ebuild b/dev-python/cython/cython-0.29.21-r1.ebuild
16 new file mode 100644
17 index 00000000000..0d37c4e33e8
18 --- /dev/null
19 +++ b/dev-python/cython/cython-0.29.21-r1.ebuild
20 @@ -0,0 +1,75 @@
21 +# Copyright 1999-2020 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +PYTHON_COMPAT=( python3_{6..9} pypy3 )
27 +PYTHON_REQ_USE="threads(+)"
28 +
29 +inherit distutils-r1 toolchain-funcs elisp-common
30 +
31 +DESCRIPTION="A Python to C compiler"
32 +HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
33 + https://github.com/cython/cython"
34 +SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
35 +
36 +LICENSE="Apache-2.0"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
39 +IUSE="emacs test"
40 +RESTRICT="!test? ( test )"
41 +
42 +RDEPEND="
43 + emacs? ( >=app-editors/emacs-23.1:* )
44 +"
45 +BDEPEND="${RDEPEND}
46 + dev-python/setuptools[${PYTHON_USEDEP}]
47 + test? (
48 + $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
49 + 'python3*')
50 + )"
51 +
52 +PATCHES=(
53 + "${FILESDIR}/cython-0.29.14-sphinx-update.patch"
54 +)
55 +
56 +SITEFILE=50cython-gentoo.el
57 +
58 +distutils_enable_sphinx docs
59 +
60 +python_compile() {
61 + # Python gets confused when it is in sys.path before build.
62 + local -x PYTHONPATH=
63 +
64 + distutils-r1_python_compile
65 +}
66 +
67 +python_compile_all() {
68 + use emacs && elisp-compile Tools/cython-mode.el
69 +}
70 +
71 +python_test() {
72 + tc-export CC
73 + # https://github.com/cython/cython/issues/1911
74 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
75 + "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
76 + || die "Tests fail with ${EPYTHON}"
77 +}
78 +
79 +python_install_all() {
80 + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
81 + distutils-r1_python_install_all
82 +
83 + if use emacs; then
84 + elisp-install ${PN} Tools/cython-mode.*
85 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
86 + fi
87 +}
88 +
89 +pkg_postinst() {
90 + use emacs && elisp-site-regen
91 +}
92 +
93 +pkg_postrm() {
94 + use emacs && elisp-site-regen
95 +}