commit:     bf5b4651e442ab6a4b7cf4e928f961e7e75118c7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 13 06:04:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 13 06:04:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf5b4651

dev-python/cython: add 3.0.0_rc2

We also disable some unnecessary tests (examples, style) and fix tests with
CYTHON_FORCE_REGEN set.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/cython/Manifest                |  1 +
 dev-python/cython/cython-3.0.0_rc2.ebuild | 84 +++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index 93c951c79044..2678fda9c144 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -2,3 +2,4 @@ DIST cython-0.29.34.gh.tar.gz 2114639 BLAKE2B 
c5f70fd3e6074d9030a1035bc98d71b703
 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
 DIST cython-3.0.0b3.gh.tar.gz 2688784 BLAKE2B 
933bb48b2bf5169c973a36c877a36eae28b80409a7ff395b82a14ac0740247496df3c9f2d69884c823b7475069f0c75d6cbbb964b88de60b38082e6e36659bff
 SHA512 
f1d0fdcec4bc6b0f6cb66078592424fdcb7a028b79c5b9d41280ae112235736d11c9f4f793e810007e880ae0def195ac25999db59065c7f7bdcfab84b06bf7d3
+DIST cython-3.0.0rc2.gh.tar.gz 2713358 BLAKE2B 
5d1e1043e0785c4e79441e47ab6d03b7dbdff8728946707acd39452c1a20e3527e3142bbf09d140d28e233ef0ae0e870650f5f77a8d2a1d084199b5b39937463
 SHA512 
42ff1b3f2509c90be6007b9156454ae89c1be26a9dde6ca9c109b0cfa3de30797eeeffef38ea1bfe37a9c8e062c776c8cb755826f8c25aa7c9703fbb031bf643

diff --git a/dev-python/cython/cython-3.0.0_rc2.ebuild 
b/dev-python/cython/cython-3.0.0_rc2.ebuild
new file mode 100644
index 000000000000..3e911be4bd62
--- /dev/null
+++ b/dev-python/cython/cython-3.0.0_rc2.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}]
+               ' 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"
+)
+
+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
+}

Reply via email to