summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-02-20 21:55:35 +0100
committerMichał Górny <mgorny@gentoo.org>2021-02-21 00:52:27 +0100
commit7367523ceee8b89e464d709c1372c6404ddd40a1 (patch)
tree0c08d3f2e143435a5690093c31e8813f8e53e6dd /dev-python/cython
parentnet-proxy/shadowsocks-libev: remove unused patch (diff)
downloadgentoo-7367523ceee8b89e464d709c1372c6404ddd40a1.tar.gz
gentoo-7367523ceee8b89e464d709c1372c6404ddd40a1.tar.bz2
gentoo-7367523ceee8b89e464d709c1372c6404ddd40a1.zip
dev-python/cython: Bump to 0.29.22
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/cython')
-rw-r--r--dev-python/cython/Manifest1
-rw-r--r--dev-python/cython/cython-0.29.22.ebuild75
2 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index a5e08409004e..434af0421116 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -1 +1,2 @@
DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679
+DIST cython-0.29.22.gh.tar.gz 2091955 BLAKE2B 8225fa6073d43de1e44e8cd22d52f9bde5d3b6e6e766c74d5ef18d77b57c0e1b22a21cae5b133b0b22f7207aa51dc0e76f1073db977190d42c2b55cc2d7e148e SHA512 b7f22112678f159bf1d0ad5fe4f7c103e96f240bab4d9dc07edd7c2f66a9887b9af72b32f1d5886361b48d428bc2b9499d3c5b59ce5af1068f20a26549783dd6
diff --git a/dev-python/cython/cython-0.29.22.ebuild b/dev-python/cython/cython-0.29.22.ebuild
new file mode 100644
index 000000000000..137bf8549e56
--- /dev/null
+++ b/dev-python/cython/cython-0.29.22.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{7..9} 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 ~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}/cython-0.29.14-sphinx-update.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
+}