commit:     b28fd4b74718fb4047db1baad10f0002d840f637
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  5 23:56:10 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct  5 23:56:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b28fd4b7

dev-python/cython: add 3.0.3 (masked)

Masked because it breaks scipy.

Bug: https://github.com/cython/cython/issues/5748
Bug: https://bugs.gentoo.org/915084
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/cython/Manifest            |  1 +
 dev-python/cython/cython-3.0.3.ebuild | 84 +++++++++++++++++++++++++++++++++++
 profiles/package.mask                 |  4 ++
 3 files changed, 89 insertions(+)

diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index de64a4d0e0f0..bbe8cde0364f 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -1,2 +1,3 @@
 DIST cython-0.29.36.gh.tar.gz 2115333 BLAKE2B 
6d43779c7222ff65d7de3a35ec18ef636480807d53480a8f94cc8c92d462fcc2f4d201a3bbf6e840a11fd33025e32c53f85626b05c131d10eed2859cdca7eb2d
 SHA512 
a086fe1a11290cd3c870b891e61a0a0e2595bab9c26888024a758b6950c07059346d682fa9349e46c0af89805abbdd750059b3189960b8ce18007dfb5eb4391a
 DIST cython-3.0.2.gh.tar.gz 2744583 BLAKE2B 
f631891870a6ce24acf2bcde75ebcb9775cf0df7840fe9d7b138cfdea64d54e9253a53d35d892a9086f251c1294d9414eec8521218d031840a3cd06903fefb86
 SHA512 
f55be138efdca6ca61bd39c6f2fab736244328a170a6f6c9bda87036e022c846930b209e9e9101fad889cb179d6e60034ba6f299f14b3056536d46235b438eb7
+DIST cython-3.0.3.gh.tar.gz 2753188 BLAKE2B 
0e6d40533f1cebf3c4217dc19aeebc2f873a8bacb94e68810e81d1c6d4cd75176de88516f2d82f43b36107656b6cd5e6990547e93bd8436b1aa93c73ccda6eaf
 SHA512 
c27c16abaf0122ad61e0eeb92aa80a33fc491332b8ebec209cd1810d2b0e3bf14fe1e81838803b86f407520a6d6f7ab8b84d97e495e7d91fd6f7702a46980caa

diff --git a/dev-python/cython/cython-3.0.3.ebuild 
b/dev-python/cython/cython-3.0.3.ebuild
new file mode 100644
index 000000000000..4223753eab93
--- /dev/null
+++ b/dev-python/cython/cython-3.0.3.ebuild
@@ -0,0 +1,84 @@
+# 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}]
+               ' "${PYTHON_TESTED[@]}")
+       )
+"
+
+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"
+)
+
+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/profiles/package.mask b/profiles/package.mask
index 3bb837b104a3..0d901e772554 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -33,6 +33,10 @@
 
 #--- END OF EXAMPLES ---
 
+# Sam James <s...@gentoo.org> (2023-10-06)
+# Breaks building scipy: https://github.com/cython/cython/issues/5748
+=dev-python/cython-3.0.3
+
 # Mart Raudsepp <l...@gentoo.org> (2023-10-04)
 # GStreamer plugin removed upstream. The database used by this music 
fingerprint
 # plugin has been defunct for a while. Removal on 2023-11-04. Bug #915189.

Reply via email to