commit: f6738a7d5215c8ef440aa348be066a8591246530
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 9 01:06:55 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 9 01:06:55 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6738a7d
dev-python/cython: Bump to 3.1.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cython/Manifest | 1 +
dev-python/cython/cython-3.1.0.ebuild | 84 +++++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+)
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index 17794fce5adf..b2ed93e391c6 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -1,3 +1,4 @@
DIST cython-3.0.12.tar.gz 2757617 BLAKE2B
064549e36e03424065eab081b60e2761d198490cfd4d7836ea236b833ada3962e6ed42ba1710b33418f8a31ac282cdc156ceb544ee21be80ee34b7a3d3f6c7fb
SHA512
c4e85596eeea444fae983d32ce8731cc5d0d612d1f96b998db3aa7946e8be151a7ea62c6df163d875111e306c870656b82a8468dd873cacf84c7bd5671a39bc3
+DIST cython-3.1.0.tar.gz 3181017 BLAKE2B
8da25d43e4e24503dba8f0b22176eecf31d597c091734a7d3460d712137783c451f4589a99932ad3c0b028a825939980a92d9a653208eff2be71307680d353ff
SHA512
94bbf2d020785a24828e9f5516515d11926bc3511074e5ea780db30d0b8dde332d52adb950dbdca4767ba86d5e7630549efc442e73269d2c4c91ac4844a69a14
DIST cython-3.1.0rc1.tar.gz 3158411 BLAKE2B
44540e95b8b060956654a0d92fc4b8417088816a1e3f8fc17c8575a1cbd4b71a76cc69209d58c731281a310a9f6a7e2e711f88dc6855bc487d08056203cb04d8
SHA512
b0cefe1d4e248e6044af373088902475839ae06b5855b5b3bffdce5159a0f6e54802c24715a6f6e3242a250841c2ff1e56435b7ed3e304964af01a162f8a851a
DIST cython-3.1.0rc2.tar.gz 3170920 BLAKE2B
08dbce1c6d52295dfc09d14349af03d2d58c84d165b92b8c95c24b6446695e4064960280acb177ab4114b381ee03c99d230f4b70a6f71b9a4b9a8ccd85e7a2e6
SHA512
89f75cd32187db8072fc9596528f72b374f47a0bcfeeea24d401bc4ab52b48ec16049e68e2b8c36ba6b9b6e28bf6e8d5f8f3dde2f19452ee3d8baf21bdf0e747
diff --git a/dev-python/cython/cython-3.1.0.ebuild
b/dev-python/cython/cython-3.1.0.ebuild
new file mode 100644
index 000000000000..9119e0f01f76
--- /dev/null
+++ b/dev-python/cython/cython-3.1.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2025 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_{11..12} )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3_11 python3_13{,t} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 multiprocessing pypi toolchain-funcs
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="
+ https://cython.org/
+ https://github.com/cython/cython/
+ https://pypi.org/project/Cython/
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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-2[${PYTHON_USEDEP}]
+ ' "${PYTHON_TESTED[@]}")
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
+ "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
+)
+
+distutils_enable_sphinx docs \
+ dev-python/jinja2 \
+ dev-python/sphinx-issues \
+ dev-python/sphinx-tabs
+
+python_prepare_all() {
+ # Needs dev-python/pip and doesn't like 'externally-managed' (bug
#927995)
+ rm tests/run/coverage_cmd_src_pkg_layout.srctree || die
+
+ distutils-r1_python_prepare_all
+}
+
+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
+}