summaryrefslogtreecommitdiff
path: root/dev-python/cython
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-28 16:37:22 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-28 16:37:22 +0100
commit0c59fd5caa123ae7755b01bb4826776078bf1b81 (patch)
tree8a596e6251db168aba10901161e43d3c0d0f7477 /dev-python/cython
parenta150275298c698f2489d072115ed2e2591204b31 (diff)
gentoo auto-resync : 28:07:2023 - 16:37:22
Diffstat (limited to 'dev-python/cython')
-rw-r--r--dev-python/cython/Manifest2
-rw-r--r--dev-python/cython/cython-3.0.0-r1.ebuild85
-rw-r--r--dev-python/cython/files/cython-3.0.0-version-stderr-stdout.patch35
3 files changed, 122 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index 29e889cf0b4f..71147a2ba8d4 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -2,6 +2,7 @@ AUX 50cython-gentoo.el 388 BLAKE2B 5bc38190b467efa9e7be1a5831022534dbfdc02206fca
AUX cython-0.29.22-spawn-multiprocessing.patch 963 BLAKE2B ebbc3f6f4fa88e7e082326bccbad328724a4ff5645f0b2aa28f21419044b17bed8495618bb980b23a99310c2b6ef275331e1b9aa6d734017eb33646c92a07a73 SHA512 3f5c6b4108b87cf3014416386095c07ac91762152bbd87e8bd589177d40b933c11e19610bea06720c5c70f76b5b9b70d27e5c3cfa20eed30deaaf7d122910bd3
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
DIST cython-0.29.34.gh.tar.gz 2114639 BLAKE2B c5f70fd3e6074d9030a1035bc98d71b703e0f391b61bd91f3ffba2c35a29a98b9ff8ef2047e7c75743ead280f0f06a924abe84ae8bf7696b65da662a3c58ee0c SHA512 51679d1304d0f87dfb51e60c753f1ce60027f855a91cf130a5dcf84353884a7dcf09c01701945ae2f9173f8f095890c377d5faac28c2f01d7f764609c0130411
DIST cython-0.29.35.gh.tar.gz 2115190 BLAKE2B ac23abbd2b560ee52a79840d995a4cf36ddb3a8705b9327010f1ad6add8028185c15703efcc1d59b581d65b5de38e123c0f07c36fe6ffe54a6efee7512161344 SHA512 35d679d94e1f731e004b83fb4ae0d569703b0800c913012308146b1c54463ce12cb1cf3733e24162fb357f179444c5ca31108a37850e6c749ddebac5175119f5
DIST cython-0.29.36.gh.tar.gz 2115333 BLAKE2B 6d43779c7222ff65d7de3a35ec18ef636480807d53480a8f94cc8c92d462fcc2f4d201a3bbf6e840a11fd33025e32c53f85626b05c131d10eed2859cdca7eb2d SHA512 a086fe1a11290cd3c870b891e61a0a0e2595bab9c26888024a758b6950c07059346d682fa9349e46c0af89805abbdd750059b3189960b8ce18007dfb5eb4391a
@@ -9,5 +10,6 @@ DIST cython-3.0.0.gh.tar.gz 2713478 BLAKE2B 16be50b463cf155417fee02b4529bbde8c44
EBUILD cython-0.29.34.ebuild 2053 BLAKE2B 23381f1aef8140eb5becd09cb5f39563d8d801665b7fb6f8674658d7c5923855c9124dc88c10b0bc024b5b8771a1ed25faa938b7380dbb556b84d10a34b9a081 SHA512 7dd4ea66bdcb44dc64be8d617eac48bf4f80a32db5c8e2423a94c2c7ebef2857f1a103f07f32e6281d0fc84f4d78e27e8582006bebfc4cb7deae1f1b8c1eb333
EBUILD cython-0.29.35.ebuild 2228 BLAKE2B c80e9cedb151c7d971bb52118f67332bbcecc1e780dbef65d7965d3bac23dceeee1a189b84e3956770866dcb73a3b2f2917d4db9b3cd0f49bdf3f0e82c5f01de SHA512 be56773909d380c114bb15b40a6f2c778be66e29d465f976c64beafdba1d28f445ab63853a100f1c9e5247bfca8b86277d4fccaa72b54c889162b337cc7c9fb8
EBUILD cython-0.29.36.ebuild 2240 BLAKE2B 951c47bc8110df60e659b7c1d94fcf0fa841064d2e47dc1883fcd681ea19e77310872b00b5e1ce0bc73e6862b9e42b0bff00407e9612fe0096c91269b9bd9898 SHA512 5112fbe372f04050e7aabf954950b37ba489f19eb5ad913dbb1addf60263edf8bb283fac608254d6ba70d560cc1e9ad5f3e2f312d5256a7ccbcf0444fea789fd
+EBUILD cython-3.0.0-r1.ebuild 2060 BLAKE2B ba3ecc1e3a8f4f411fd1ed61accfdea575c4a371e63cb5e52043509365cc1025ae885eab60ad262850a32e0005d6573061f0ef0bb71a8b3515a2ebe467840478 SHA512 f788bbcee1a8915a561e582236d42b9eba8cd3ace8271518402608bedaca1150691939fda3fc44897783e70575a6a183fc2479646ab5a6c21bfa0f5f2584cf82
EBUILD cython-3.0.0.ebuild 2012 BLAKE2B 528ac18c3d91d15aad03d5ec6449957d0d0c3af98dedf11ed8f8c6762245811b1b16e6f443e7a1904eb32c93cdf7d222ab373751543dead367399767f75b6bd9 SHA512 eb5bb85611f0490e8d2d80b2c97404f9a9029ff9575241384a21b58010e3241bb90a138fec7fd5aaf0e9611fca1d2bcd429ad45f6e3fdcb703c5f8dead0b8265
MISC metadata.xml 606 BLAKE2B 1ee3fc75852383aa0618afeb7521c3ae0e95b518c85b2c58ff958905092cf68017d313a09d25031a50b649f9dd1b452e751036f2552df9d91447baaeff0a8f0b SHA512 b7917c2e417cee9e59c8011246f7223f5095c87f0294ea140dbfc8fda0b09cf61c9f055380a9d3f74a07e71bb49d75f219d6224ea95f1f4d4b451e5688c13f78
diff --git a/dev-python/cython/cython-3.0.0-r1.ebuild b/dev-python/cython/cython-3.0.0-r1.ebuild
new file mode 100644
index 000000000000..5455a20d026a
--- /dev/null
+++ b/dev-python/cython/cython-3.0.0-r1.ebuild
@@ -0,0 +1,85 @@
+# 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"
+ "${FILESDIR}/${P}-version-stderr-stdout.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.0-version-stderr-stdout.patch b/dev-python/cython/files/cython-3.0.0-version-stderr-stdout.patch
new file mode 100644
index 000000000000..7a12c6eead53
--- /dev/null
+++ b/dev-python/cython/files/cython-3.0.0-version-stderr-stdout.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/911333
+https://github.com/cython/cython/pull/5572
+https://github.com/cython/cython/commit/ca69b359b040bf6c0fc90692bbea3bdd9d7877e6
+
+From ca69b359b040bf6c0fc90692bbea3bdd9d7877e6 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Fri, 28 Jul 2023 06:52:03 -0400
+Subject: [PATCH] Only write the version to stderr, if it's a separate file
+ descriptor from stdout (GH-5572)
+
+At least one project tries to detect the Cython version by redirecting stderr to
+stdout and capturing it. This is done in pure POSIX shell, so it probably seemed
+like the simple and obvious solution for a less capable programming language
+given that no output at all was expected on stdout.
+
+But the result is that the version number appears twice, and then gets misparsed
+and ends up triggering bad assumptions in the code running cython.
+
+It turns out that it's pretty easy to just print once, though. Detect when
+stdout and stderr are redirected to the same location, and only print once.
+
+See https://github.com/cython/cython/issues/5504
+Fixes https://bugs.gentoo.org/911333
+--- a/Cython/Compiler/Main.py
++++ b/Cython/Compiler/Main.py
+@@ -776,7 +776,7 @@ def main(command_line = 0):
+ print("Cython version %s" % __version__)
+ # For legacy reasons, we also write the version to stderr.
+ # New tools should expect it in stdout, but existing ones still pipe from stderr.
+- if not sys.stderr.isatty():
++ if not sys.stderr.isatty() and os.fstat(1) != os.fstat(2):
+ sys.stderr.write("Cython version %s\n" % __version__)
+ if options.working_path!="":
+ os.chdir(options.working_path)
+