summaryrefslogtreecommitdiff
path: root/dev-python/cython
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-12 10:40:56 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-12 10:40:56 +0100
commitfc1125ea4b3373e327ba0e157daa1d7e8aee15f9 (patch)
tree44c9694d007e95c09700bf72177701759333a717 /dev-python/cython
parent5d5e56d92268c2b9b6ccc38eeaa3516ce9b1e8fd (diff)
gentoo auto-resync : 12:09:2023 - 10:40:55
Diffstat (limited to 'dev-python/cython')
-rw-r--r--dev-python/cython/Manifest2
-rw-r--r--dev-python/cython/cython-3.0.2-r1.ebuild86
-rw-r--r--dev-python/cython/files/cython-3.0.2-enummeta.patch69
3 files changed, 157 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index 705b82107ba5..191c96daee1c 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -3,10 +3,12 @@ AUX cython-0.29.22-spawn-multiprocessing.patch 963 BLAKE2B ebbc3f6f4fa88e7e08232
AUX cython-0.29.23-pythran-parallel-install.patch 874 BLAKE2B 39286ee98427260ce6ec077a750e0a1412445343fd11be9d96d8ab65b7d9789c5f1864cb9a1b3565ee3f51e117ecc854ebacc39dc32917fc72f36340c2d7f0a1 SHA512 8b78755288d3f165d962a5a1be9492d609a8e3dab10197b271c84ed0c4b7006053038e68f18bbb4204e6acba83e3f72ffeabf57ffa03f4a08f28b65db3cfd854
AUX cython-0.29.23-test_exceptions-py310.patch 656 BLAKE2B 6c650c85d01b8bf367528d144cd967fa9def94634e35763e2e7a1c3e5afa2b01d0c84694024dde6e45577eee223f6464b5f88ab971d207d35892edf347a0c08f SHA512 d8f7f770a0b3303552deec0e7d3f9258de1edcd384f4b2c3881634fd21ce847a3d974e9142d1ed2fbe3a549e65292c6690be3a36ab4de52d0593d9831dc2f7ce
AUX cython-3.0.0-version-stderr-stdout.patch 1663 BLAKE2B 171ec4968909b80208e3dcf12ad6b4df58decaa924320d079cfdb0050b0ee860967f38c92a4dbf0b80d2741b1579fa590081c5a8d4d61514bd9acb3c7cc7f956 SHA512 e238984db29e89ec966a9978b7be4cf1a68c01fb7dd35dcd8c6ef90cc1b1b7807d9d9aa16300c9e40f60362b0952305dadd1dc27275aa5282b091ead9b8cdca7
+AUX cython-3.0.2-enummeta.patch 2485 BLAKE2B 65d662309a470e316f6fbf5d310f6a0821e1f9d170203a698b336cf85dcf2f83d500a8bfbde2064e9c29f69e69097a311952ca96301f44a1581e6e730125cb31 SHA512 2c7f0d5a91b82f08b88c5129857fc75e2aa4ef770707605733af1c8a75f3d3a8ba0a82095f9393c2452fdb4afc48f52958ccc49757a541752c798e8ff6e3353c
DIST cython-0.29.36.gh.tar.gz 2115333 BLAKE2B 6d43779c7222ff65d7de3a35ec18ef636480807d53480a8f94cc8c92d462fcc2f4d201a3bbf6e840a11fd33025e32c53f85626b05c131d10eed2859cdca7eb2d SHA512 a086fe1a11290cd3c870b891e61a0a0e2595bab9c26888024a758b6950c07059346d682fa9349e46c0af89805abbdd750059b3189960b8ce18007dfb5eb4391a
DIST cython-3.0.0.gh.tar.gz 2713478 BLAKE2B 16be50b463cf155417fee02b4529bbde8c4402bac0098ddf2cb05e33ac4c5b455bf7595b046b2bc6edcc8121f2c6be3b7af60c3c721a37bebcf4c654cd41a43f SHA512 a9bf6f0a78accd0624bc2a61329541d97d60257ae3a6b6601f73bd9122427a3d460129b317f000d3061a4dfe3e6a6de59342354862ded13e85c7eb622ee39f9a
DIST cython-3.0.2.gh.tar.gz 2744583 BLAKE2B f631891870a6ce24acf2bcde75ebcb9775cf0df7840fe9d7b138cfdea64d54e9253a53d35d892a9086f251c1294d9414eec8521218d031840a3cd06903fefb86 SHA512 f55be138efdca6ca61bd39c6f2fab736244328a170a6f6c9bda87036e022c846930b209e9e9101fad889cb179d6e60034ba6f299f14b3056536d46235b438eb7
EBUILD cython-0.29.36.ebuild 2232 BLAKE2B 437729f1c61680b7d7f4d6cba1bbfd85e8ae6f70e4da47d8ff30aa84cf5ec50e7049671d75d6b7921e02236ffd47c3451e6f01bebc9e55e1ee834879e62f8b56 SHA512 dfd4d1f7c1907f27ff38a2e2dbcf27de4c5435920cbd19874430827e3089ca6285d225ae594f6c1566d84880fbcc541a7f78f3709c960822590b2e4fba5765a8
EBUILD cython-3.0.0-r1.ebuild 2054 BLAKE2B 49d48af9c32982fe191285b375a1f05f5c817f1449afcc3b387d2b1aef84e4639ba71c93ffc2c1ed107ce9343e527db0ef27198b7ef01b3421dff8594c3cba7a SHA512 a6de93cf83b52b7b852a4c425152f6b69c30a740031e870e73395a8cd7cabcc0fe96b957b5d5114d0d212771c7a096340ecfd66e198d64ecd3b7a1b5031344d9
+EBUILD cython-3.0.2-r1.ebuild 2093 BLAKE2B 7b44884e96ef0170e3a6e2faa56ecbb9b9fe2958648343f789b767b633d928976f651faf4df53312ec67b5b6430a20f89cb25fef01f3e0c88bacf33c942b548f SHA512 740e2cabb33f2baf16b9a5233747d49005008ca9d821a51650c43872750241ea7934dba60bb367ba1770d68e52b7eef879220e4709f7984e1bedfb2401da9246
EBUILD cython-3.0.2.ebuild 2012 BLAKE2B 528ac18c3d91d15aad03d5ec6449957d0d0c3af98dedf11ed8f8c6762245811b1b16e6f443e7a1904eb32c93cdf7d222ab373751543dead367399767f75b6bd9 SHA512 eb5bb85611f0490e8d2d80b2c97404f9a9029ff9575241384a21b58010e3241bb90a138fec7fd5aaf0e9611fca1d2bcd429ad45f6e3fdcb703c5f8dead0b8265
MISC metadata.xml 606 BLAKE2B 1ee3fc75852383aa0618afeb7521c3ae0e95b518c85b2c58ff958905092cf68017d313a09d25031a50b649f9dd1b452e751036f2552df9d91447baaeff0a8f0b SHA512 b7917c2e417cee9e59c8011246f7223f5095c87f0294ea140dbfc8fda0b09cf61c9f055380a9d3f74a07e71bb49d75f219d6224ea95f1f4d4b451e5688c13f78
diff --git a/dev-python/cython/cython-3.0.2-r1.ebuild b/dev-python/cython/cython-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..444c115bf846
--- /dev/null
+++ b/dev-python/cython/cython-3.0.2-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_TESTED=( python3_{10..11} )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_12 pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 multiprocessing toolchain-funcs
+
+MY_P=${P/_rc/rc}
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="
+ https://cython.org/
+ https://github.com/cython/cython/
+ https://pypi.org/project/Cython/
+"
+SRC_URI="
+ https://github.com/cython/cython/archive/${PV/_rc/rc}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ ' python3_{10..11})
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
+ "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
+ "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
+ # https://github.com/cython/cython/pull/5675
+ "${FILESDIR}/${P}-enummeta.patch"
+)
+
+distutils_enable_sphinx docs \
+ dev-python/jinja \
+ dev-python/sphinx-issues \
+ dev-python/sphinx-tabs
+
+python_compile() {
+ # Python gets confused when it is in sys.path before build.
+ local -x PYTHONPATH=
+
+ distutils-r1_python_compile
+}
+
+python_test() {
+ if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
+ einfo "Skipping tests on ${EPYTHON} (xfail)"
+ return
+ fi
+
+ # Needed to avoid confusing cache tests
+ unset CYTHON_FORCE_REGEN
+
+ tc-export CC
+ # https://github.com/cython/cython/issues/1911
+ local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
+ "${PYTHON}" runtests.py \
+ -vv \
+ -j "$(makeopts_jobs)" \
+ --work-dir "${BUILD_DIR}"/tests \
+ --no-examples \
+ --no-code-style \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/cython/files/cython-3.0.2-enummeta.patch b/dev-python/cython/files/cython-3.0.2-enummeta.patch
new file mode 100644
index 000000000000..284af4ac6c16
--- /dev/null
+++ b/dev-python/cython/files/cython-3.0.2-enummeta.patch
@@ -0,0 +1,69 @@
+From 81cc077ad035947a3429c245f1e28c8b43c6dcc6 Mon Sep 17 00:00:00 2001
+From: da-woods <dw-git@d-woods.co.uk>
+Date: Sat, 2 Sep 2023 10:32:59 +0100
+Subject: [PATCH] Fix invalid fastcall dict when keywords are passed
+
+Fixes #5665
+
+I'm slightly surprised this hasn't caused more bugs. We're passing
+a dict where we should be passing a tuple of names.
+
+Replacement should hopefully be right, but I don't know how
+optimized or otherwise it is.
+---
+ Cython/Utility/ObjectHandling.c | 36 +++++++++++++++++++--------------
+ 1 file changed, 21 insertions(+), 15 deletions(-)
+
+diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
+index 8ea5be42935..507fb94f605 100644
+--- a/Cython/Utility/ObjectHandling.c
++++ b/Cython/Utility/ObjectHandling.c
+@@ -2328,27 +2328,33 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj
+ #endif
+ #endif
+
+- #if CYTHON_VECTORCALL
+- #if Py_VERSION_HEX < 0x03090000
+- vectorcallfunc f = _PyVectorcall_Function(func);
+- #else
+- vectorcallfunc f = PyVectorcall_Function(func);
+- #endif
+- if (f) {
+- return f(func, args, (size_t)nargs, kwargs);
+- }
+- #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
+- // exclude fused functions for now
+- if (__Pyx_CyFunction_CheckExact(func)) {
+- __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
+- if (f) return f(func, args, (size_t)nargs, kwargs);
++ if (kwargs == NULL) {
++ #if CYTHON_VECTORCALL
++ #if Py_VERSION_HEX < 0x03090000
++ vectorcallfunc f = _PyVectorcall_Function(func);
++ #else
++ vectorcallfunc f = PyVectorcall_Function(func);
++ #endif
++ if (f) {
++ return f(func, args, (size_t)nargs, NULL);
++ }
++ #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
++ // exclude fused functions for now
++ if (__Pyx_CyFunction_CheckExact(func)) {
++ __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
++ if (f) return f(func, args, (size_t)nargs, NULL);
++ }
++ #endif
+ }
+- #endif
+
+ if (nargs == 0) {
+ return __Pyx_PyObject_Call(func, $empty_tuple, kwargs);
+ }
++ #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
++ return PyObject_VectorcallDict(func, args, nargs, kwargs);
++ #else
+ return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
++ #endif
+ }
+
+