summaryrefslogtreecommitdiff
path: root/dev-python/cython
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/cython')
-rw-r--r--dev-python/cython/Manifest15
-rw-r--r--dev-python/cython/cython-0.22.ebuild62
-rw-r--r--dev-python/cython/cython-0.24.1.ebuild80
-rw-r--r--dev-python/cython/cython-0.25.2.ebuild84
-rw-r--r--dev-python/cython/cython-0.26.1.ebuild80
-rw-r--r--dev-python/cython/cython-0.26.ebuild80
-rw-r--r--dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch19
-rw-r--r--dev-python/cython/files/50cython-gentoo.el11
-rw-r--r--dev-python/cython/metadata.xml16
9 files changed, 447 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
new file mode 100644
index 000000000000..217e443d50d6
--- /dev/null
+++ b/dev-python/cython/Manifest
@@ -0,0 +1,15 @@
+AUX 0.25.2-test-cpdef_enums-L-suffix.patch 586 SHA256 9ac2ff74927e95f8deb7b8d7c18d5459ea73fb19e7e828db0969fed0d55c10bd SHA512 95e4d94250720161da9a08441201e76aaaf5477325950ccc1cb9df209b8e5eb77572d81b75ddb9f5733973578fcf44c17f5b2d8f7338badb664cb2f5659be6b9 WHIRLPOOL 264b18c234631810fba85d3c16b043e8cac307fabba2844cfd0f2a5150522308d4a2ad86e6622a86d4d7d4cc3020dedd3c4076f3f8f05f46929e564946379a7b
+AUX 50cython-gentoo.el 388 SHA256 7dc8a6b8003478873ac5f276691f1e805dbba3352efd36640a1cc5ddb443ef54 SHA512 dd554d0d6cc220988552b06a20337af20b847e75bee76c90eb92ea979d9c2ae9d64ffa849266ff403d857b3737981de451bf40061bea0533600476bc57661c18 WHIRLPOOL c69767958f4c44b9ae56815c800635b695c3cd7800172d66908a78a362d76acf0292ecd03d50d83d608919c5da30f4fc9ce75b067acc7b30a564893012b6ac19
+DIST Cython-0.22.tar.gz 1584483 SHA256 14307e7a69af9a0d0e0024d446af7e51cc0e3e4d0dfb10d36ba837e5e5844015 SHA512 856220fa579e272ac38dcef091760f527431ff3b98df9af6e68416fcf77d9659ac5abe5c7dee41331f359614637a4ff452033085335ee499830ed126ab584267 WHIRLPOOL d9919e1fe33f7ea02833c485e10667d8470d7c69901b2419c6c4c1d464f9ef2444795e14903cc66b6fee40ec5a4c20308c331ad93fd8818f207d0a21cccf9b2b
+DIST Cython-0.24.1.tar.gz 1703756 SHA256 84808fda00508757928e1feadcf41c9f78e9a9b7167b6649ab0933b76f75e7b9 SHA512 c5a3e884edd782c47c81aef29708035bbcd1c14d17e005668da8a4e26fdbba9af9ec283fd46ceaa2cab6fc4ec0d42f7d409832d7cc0a3ec00e84b968b1bf27ea WHIRLPOOL 14224a56c5a6f5cd3f389225c440c65b30a5d1b92c63587c4e9af258b23b1bed1c01330830931c5aba596649d19b0aafd0e559aed5ad7b577a59417463fc3b4a
+DIST Cython-0.25.2.tar.gz 1703315 SHA256 f141d1f9c27a07b5a93f7dc5339472067e2d7140d1c5a9e20112a5665ca60306 SHA512 1974b9374aeedb030307dc95aa6560ce9d5e1652783cd4552e96ef11663c73dd263e3521b68e7712abbb31628011e2e66320c5ee2577968684e2679eb80726e1 WHIRLPOOL bb12d06fddb30d99527e3a62e8788b7aee92787aec9c46e927658f7ee60c8f3e32acb34b2deee1d0cf6ece7f4b06288008082ac609b8cb4b101a1348b1017865
+DIST Cython-0.26.1.tar.gz 1725133 SHA256 c2e63c4794161135adafa8aa4a855d6068073f421c83ffacc39369497a189dd5 SHA512 cdf31afaba78209c37a224345471c5c822b78c6d26c51583c46669b6b2b57b4952b33a839a51d06c3330fdff889345ac611fbaa2b2f17498cb02f3b5675f7948 WHIRLPOOL 1ef093c41f06249ee4fc40ae39078f20ae14b80b6a9dca382dfa9198a600928ddd0bc20fc42ec398b041b5f97c3c78003725467b26b9cc3a8b68405a288f0f87
+DIST Cython-0.26.tar.gz 1692039 SHA256 4c24e2c22ddaed624d35229dc5db25049e9e225c6f64f3364326836cad8f2c66 SHA512 58b7dbdca3b1bdfcb8b968cb1b59826b793656bb7f1203a80b59b3fae2d3174cc99f19f88fc2ec175aa98c9daeca0eb3c52674a7889ba1e914fd20d19ef92aed WHIRLPOOL 650a7db807afb11403b4850d6ec387cd5fdc528bf854f2eb4ec5b804a3b142895cbaf085fe82563374f586090e4cf5a40def6e1d410a8bea85cfa7003c44efe0
+EBUILD cython-0.22.ebuild 1773 SHA256 8edfbbe3f6bc4f1167b2ed7d0249832440dd5a00aa62275d6db138b5b9a3577d SHA512 97ccebe31f21bef76efdedf686395afe23524aa692697c1b3ccc58db36cec26fa008d2bda9542193905c89e7205706e75bd1b633999f9ddfad8696e0461790ca WHIRLPOOL 01e16d70f7947697072ac4dd45be92574da6ca2c07cdadccaa3a5279245fabb9edccf8abafb9197942c86a4395b84e1b97a99126ad0213e482ef61f5d0c792fb
+EBUILD cython-0.24.1.ebuild 2078 SHA256 14f91000cdcfbd19fdf28d99ed082843b2029e89022f91e8a2fd743b1ae81f20 SHA512 90c92bf91dd95b555d10eb46736927d0d06c0f6f919c931f778873821c20fefabb9b717b2e08965d68ede1d9e8d371aaf5ba4432e010f7764dca2d3db53731dd WHIRLPOOL 412e957b9865a3bb10fce664cfe159a10c2b387da9b9219bc9cc432d819d4234255a8c08cf84b7f42451a2cbd7758c28569c2f5314130f87da0f5ac4922079e4
+EBUILD cython-0.25.2.ebuild 2145 SHA256 284b75661a7a4547206e373e73c2e1ef14e6998768f7c7ddb044424900988013 SHA512 e8a5842dffcfb0b53680f2b717bb001aa416ea4eb94bc45ba6e79629801688e9d4059bc46223d8e66081d167a0c01913f6e9e48efac4d3dc05c55be20fd77cd2 WHIRLPOOL 0bf4da72f1f1d0f5c4ce27b4f23a54cda889c38d4752614aa9c3f78ff2d9ccfb3a045e046f68d438252e48dbb9d02b9fbac85c6d91204fd5a3091e9b3aecdc1b
+EBUILD cython-0.26.1.ebuild 2087 SHA256 02114fb6be6c5414f94dbe84f2599d29711abd2f0b65ed63e5576a8dcb4410e9 SHA512 c0a9731653608723a577f0fc53b3f418bb9f20d6300bfd0992a6767bc1353c640c2004f7f2df0f60b2b7fe404e4b5cb91ace10bb874293d7288cca4664280116 WHIRLPOOL 663b2b22e90e351bb1ee25b7fff1aa1102bd05ae8629d8f604aa63d3a3fe4c56232d166330b87f549f59afbcbcb0824acd501266e4cdb6e4cbe23adec077ca71
+EBUILD cython-0.26.ebuild 2087 SHA256 02114fb6be6c5414f94dbe84f2599d29711abd2f0b65ed63e5576a8dcb4410e9 SHA512 c0a9731653608723a577f0fc53b3f418bb9f20d6300bfd0992a6767bc1353c640c2004f7f2df0f60b2b7fe404e4b5cb91ace10bb874293d7288cca4664280116 WHIRLPOOL 663b2b22e90e351bb1ee25b7fff1aa1102bd05ae8629d8f604aa63d3a3fe4c56232d166330b87f549f59afbcbcb0824acd501266e4cdb6e4cbe23adec077ca71
+MISC ChangeLog 7241 SHA256 45c29e2c847432f739e2b1384421f24dfdd9bd37875a1bae85616fbde1e58e1c SHA512 160b823c273608b4a1d40bc5e997464c9cbb053eea24271bdbdc4a8eb5190714583616f131b85cc2db229ad2cdade42cf3ca6deff0cce07c4b61dfe04053f6f4 WHIRLPOOL c8e10dcf8347a482aaeac6d85331473adc3bd5b59f3b492fdb7fa5fc7bc387b18db27d42df85bd3b441aadb733efebfc9d836a8023e2c321af9a2c0f14355240
+MISC ChangeLog-2015 20882 SHA256 b28001e470dd06b228c1b604f7208646eb6b1615c5a7bac34f09e48b6ae99efc SHA512 6aff62c5177687862bb877541960f6b4eb428f4124e7e21708f6919414488212b44c570c04ee650810ae113c884d0846c123363ecb4370bf3e69c2a77724266f WHIRLPOOL ea2177eedd40952fd53e2c8de10bb58cb7b19b44641cd357a212b75c06e4fd8228bc2b9d5c2ccf9fccb110de1aec33d7b3066c5a84e3eff2197fa931995ba64a
+MISC metadata.xml 570 SHA256 5d651cb7914454f8fc582df9fffe8065a11bed42d0733b3db0fe6ca5941d50a7 SHA512 73c65ef6b088cb50125dd662f263fb1aa1d60c3631aa8453b9ed2ede6bbd839235c6b37c3f8d1a17618c167874d64a3aa6f95c9141c8b6c921eaf4c1c4d68dad WHIRLPOOL 72cdba315014848743a52b50d28c07a714a6a46cd7670b96392b907d0df7a4026910842bec9f9da06d6c73b129769b2daa744a4a0e870d3baa7abcf95e125dd4
diff --git a/dev-python/cython/cython-0.22.ebuild b/dev-python/cython/cython-0.22.ebuild
new file mode 100644
index 000000000000..ad25b03c6954
--- /dev/null
+++ b/dev-python/cython/cython-0.22.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic toolchain-funcs
+
+MY_PN="Cython"
+MY_P="${MY_PN}-${PV/_/}"
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="http://www.cython.org/ https://pypi.python.org/pypi/Cython"
+SRC_URI="http://www.cython.org/release/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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"
+IUSE="doc examples test"
+
+RDEPEND=""
+# On testing, setuptools invokes an error in running the testsuite cited in a number of recent bugs
+# spanning several packages. This bug has been fixed in the recent release of version 9.1
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-9.1[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_PN}-${PV%_*}"
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS="${CFLAGS}"
+ local CXXFLAGS="${CXXFLAGS}"
+ append-flags -fno-strict-aliasing
+ fi
+
+ # Python gets confused when it is in sys.path before build.
+ local PYTHONPATH=
+ export PYTHONPATH
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use doc && unset XDG_CONFIG_HOME && emake -C docs html
+}
+
+python_test() {
+ tc-export CC
+ "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.txt ToDo.txt USAGE.txt )
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ use examples && local EXAMPLES=( Demos/. )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/cython/cython-0.24.1.ebuild b/dev-python/cython/cython-0.24.1.ebuild
new file mode 100644
index 000000000000..1b46d1f93fd8
--- /dev/null
+++ b/dev-python/cython/cython-0.24.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic toolchain-funcs elisp-common
+
+MY_PN="Cython"
+MY_P="${MY_PN}-${PV/_/}"
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="http://cython.org https://pypi.python.org/pypi/Cython"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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"
+
+IUSE="doc emacs test"
+
+RDEPEND="
+ emacs? ( virtual/emacs )
+"
+# On testing, setuptools invokes an error in running the testsuite cited in a number of recent bugs
+# spanning several packages. This bug has been fixed in the recent release of version 9.1
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-9.1[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+
+SITEFILE=50cython-gentoo.el
+S="${WORKDIR}/${MY_PN}-${PV%_*}"
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS="${CFLAGS}"
+ local CXXFLAGS="${CXXFLAGS}"
+ append-flags -fno-strict-aliasing
+ fi
+
+ # Python gets confused when it is in sys.path before build.
+ local PYTHONPATH=
+ export PYTHONPATH
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use emacs && elisp-compile Tools/cython-mode.el
+
+ use doc && unset XDG_CONFIG_HOME && emake -C docs html
+}
+
+python_test() {
+ tc-export CC
+ "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.txt ToDo.txt USAGE.txt )
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ 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
+}
diff --git a/dev-python/cython/cython-0.25.2.ebuild b/dev-python/cython/cython-0.25.2.ebuild
new file mode 100644
index 000000000000..740a984cb59f
--- /dev/null
+++ b/dev-python/cython/cython-0.25.2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic toolchain-funcs elisp-common
+
+MY_PN="Cython"
+MY_P="${MY_PN}-${PV/_/}"
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="http://cython.org https://pypi.python.org/pypi/Cython"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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"
+
+IUSE="doc emacs test"
+
+RDEPEND="
+ emacs? ( virtual/emacs )
+"
+# On testing, setuptools invokes an error in running the testsuite cited in a number of recent bugs
+# spanning several packages. This bug has been fixed in the recent release of version 9.1
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-9.1[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+
+SITEFILE=50cython-gentoo.el
+S="${WORKDIR}/${MY_PN}-${PV%_*}"
+
+PATCHES=(
+ "${FILESDIR}"/0.25.2-test-cpdef_enums-L-suffix.patch
+)
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS="${CFLAGS}"
+ local CXXFLAGS="${CXXFLAGS}"
+ append-flags -fno-strict-aliasing
+ fi
+
+ # Python gets confused when it is in sys.path before build.
+ local PYTHONPATH=
+ export PYTHONPATH
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use emacs && elisp-compile Tools/cython-mode.el
+
+ use doc && unset XDG_CONFIG_HOME && emake -C docs html
+}
+
+python_test() {
+ tc-export CC
+ "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.txt ToDo.txt USAGE.txt )
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ 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
+}
diff --git a/dev-python/cython/cython-0.26.1.ebuild b/dev-python/cython/cython-0.26.1.ebuild
new file mode 100644
index 000000000000..7599fb5e7e1f
--- /dev/null
+++ b/dev-python/cython/cython-0.26.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic toolchain-funcs elisp-common
+
+MY_PN="Cython"
+MY_P="${MY_PN}-${PV/_/}"
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="http://cython.org https://pypi.python.org/pypi/Cython"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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"
+
+IUSE="doc emacs test"
+
+RDEPEND="
+ emacs? ( virtual/emacs )
+"
+# On testing, setuptools invokes an error in running the testsuite cited in a number of recent bugs
+# spanning several packages. This bug has been fixed in the recent release of version 9.1
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-9.1[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+
+SITEFILE=50cython-gentoo.el
+S="${WORKDIR}/${MY_PN}-${PV%_*}"
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS="${CFLAGS}"
+ local CXXFLAGS="${CXXFLAGS}"
+ append-flags -fno-strict-aliasing
+ fi
+
+ # Python gets confused when it is in sys.path before build.
+ local PYTHONPATH=
+ export PYTHONPATH
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use emacs && elisp-compile Tools/cython-mode.el
+
+ use doc && unset XDG_CONFIG_HOME && emake -C docs html
+}
+
+python_test() {
+ tc-export CC
+ "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.txt ToDo.txt USAGE.txt )
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ 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
+}
diff --git a/dev-python/cython/cython-0.26.ebuild b/dev-python/cython/cython-0.26.ebuild
new file mode 100644
index 000000000000..7599fb5e7e1f
--- /dev/null
+++ b/dev-python/cython/cython-0.26.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic toolchain-funcs elisp-common
+
+MY_PN="Cython"
+MY_P="${MY_PN}-${PV/_/}"
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="http://cython.org https://pypi.python.org/pypi/Cython"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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"
+
+IUSE="doc emacs test"
+
+RDEPEND="
+ emacs? ( virtual/emacs )
+"
+# On testing, setuptools invokes an error in running the testsuite cited in a number of recent bugs
+# spanning several packages. This bug has been fixed in the recent release of version 9.1
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-9.1[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+
+SITEFILE=50cython-gentoo.el
+S="${WORKDIR}/${MY_PN}-${PV%_*}"
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS="${CFLAGS}"
+ local CXXFLAGS="${CXXFLAGS}"
+ append-flags -fno-strict-aliasing
+ fi
+
+ # Python gets confused when it is in sys.path before build.
+ local PYTHONPATH=
+ export PYTHONPATH
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use emacs && elisp-compile Tools/cython-mode.el
+
+ use doc && unset XDG_CONFIG_HOME && emake -C docs html
+}
+
+python_test() {
+ tc-export CC
+ "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.txt ToDo.txt USAGE.txt )
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ 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
+}
diff --git a/dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch b/dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch
new file mode 100644
index 000000000000..3a8b9d9d1e71
--- /dev/null
+++ b/dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch
@@ -0,0 +1,19 @@
+From d92a718a26c9354fbf35f31a17de5c069865a447 Mon Sep 17 00:00:00 2001
+From: Robert Bradshaw <robertwb@gmail.com>
+Date: Tue, 24 Jan 2017 16:57:00 -0800
+Subject: [PATCH] Normalize possible L suffix.
+
+---
+ tests/run/cpdef_enums.pyx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/run/cpdef_enums.pyx b/tests/run/cpdef_enums.pyx
+index 167c762..c264ec5 100644
+--- a/tests/run/cpdef_enums.pyx
++++ b/tests/run/cpdef_enums.pyx
+@@ -93,4 +93,4 @@ def verify_resolution_GH1533():
+ 3
+ """
+ THREE = 100
+- return PyxEnum.THREE
++ return int(PyxEnum.THREE)
diff --git a/dev-python/cython/files/50cython-gentoo.el b/dev-python/cython/files/50cython-gentoo.el
new file mode 100644
index 000000000000..e6dcc6a6d7fb
--- /dev/null
+++ b/dev-python/cython/files/50cython-gentoo.el
@@ -0,0 +1,11 @@
+;;; site-lisp configuration for cython-mode
+
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'cython-mode "cython-mode" "Major mode for editing Cython files" t)
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode))
diff --git a/dev-python/cython/metadata.xml b/dev-python/cython/metadata.xml
new file mode 100644
index 000000000000..6fed3f622bc9
--- /dev/null
+++ b/dev-python/cython/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ Cython is a language that makes writing C extensions for the Python
+ language as easy as Python itself. It's based on Pyrex, but supports
+ more cutting edge functionality and optimizations.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">Cython</remote-id>
+ </upstream>
+</pkgmetadata>