public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/
Date: Mon, 19 May 2025 14:00:52 +0000 (UTC)	[thread overview]
Message-ID: <1747663204.6a2059bdf28fe8fe2d9639ea26c7ae1a5cc52c6e.sam@gentoo> (raw)

commit:     6a2059bdf28fe8fe2d9639ea26c7ae1a5cc52c6e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 19 13:55:18 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 19 14:00:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a2059bd

dev-python/cython: rework tests

* Make numpy conditional on USE=test-full

  numpy doesn't pass tests on some niche arches and maybe we'll even
  be able to destable it on the really niche arches at some point thanks
  to this.

* Make numpy conditional on PYTHON_FULLY_TESTED

  numpy depends on cython and porting numpy to a new Python impl often
  takes a while, so let's make it easy to get partial coverage.

* Fix numpy test dep (doesn't need to be <2 for a while now).

  Sent https://github.com/cython/cython/pull/6895 upstream as well.

* Enable tests for py3.13, py3.14, and pypy3_11

* More robust skips for coverage tests which have had problems before

  They're not interesting for us in packaging.

* Add some notes about other possible test deps we could add in future.

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

 dev-python/cython/cython-3.1.1.ebuild | 78 ++++++++++++++++++++++++++---------
 dev-python/cython/metadata.xml        |  6 +++
 2 files changed, 64 insertions(+), 20 deletions(-)

diff --git a/dev-python/cython/cython-3.1.1.ebuild b/dev-python/cython/cython-3.1.1.ebuild
index 3931c3e0fe2e..51b147eecc22 100644
--- a/dev-python/cython/cython-3.1.1.ebuild
+++ b/dev-python/cython/cython-3.1.1.ebuild
@@ -5,8 +5,9 @@ EAPI=8
 
 DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_TESTED=( python3_{11..12} )
-PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3_11 python3_13{,t} python3_14{,t} )
+PYTHON_FULLY_TESTED=( python3_{11..14} )
+PYTHON_TESTED=( "${PYTHON_FULLY_TESTED[@]}" pypy3_11 )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1 multiprocessing pypi toolchain-funcs
@@ -21,15 +22,17 @@ HOMEPAGE="
 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"
+IUSE="test test-full"
 RESTRICT="!test? ( test )"
 
 BDEPEND="
 	${RDEPEND}
 	test? (
-		$(python_gen_cond_dep '
-			<dev-python/numpy-2[${PYTHON_USEDEP}]
-		' "${PYTHON_TESTED[@]}")
+		test-full? (
+			$(python_gen_cond_dep '
+				dev-python/numpy[${PYTHON_USEDEP}]
+			' "${PYTHON_FULLY_TESTED[@]}")
+		)
 	)
 "
 
@@ -43,13 +46,6 @@ distutils_enable_sphinx docs \
 	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=
@@ -58,6 +54,9 @@ python_compile() {
 }
 
 python_test() {
+	# PYTHON_TESTED controls whether we expect the testsuite to
+	# pass at all, while PYTHON_FULLY_TESTED allows skipping before
+	# numpy is ported (and possibly other deps in future).
 	if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
 		einfo "Skipping tests on ${EPYTHON} (xfail)"
 		return
@@ -67,13 +66,52 @@ python_test() {
 	unset CYTHON_FORCE_REGEN
 
 	tc-export CC
-	"${PYTHON}" runtests.py \
-		-vv \
-		-j "$(makeopts_jobs)" \
-		--work-dir "${BUILD_DIR}"/tests \
-		--no-examples \
-		--no-code-style \
-		|| die "Tests fail with ${EPYTHON}"
+
+	local testargs=(
+		-vv
+		-j "$(makeopts_jobs)"
+		--work-dir "${BUILD_DIR}"/tests
+
+		--no-examples
+		--no-code-style
+
+		# Fails to find embedded.c
+		--exclude 'embedded'
+		# coverage_installed_pkg needs dev-python/pip and doesn't like
+		# 'externally-managed' (bug #927995), but we don't really
+		# want automagic test dependencies at all, so just skip
+		# unimportant-for-us coverage tests entirely.
+		--exclude 'run.coverage*'
+		--exclude 'Cython.Coverage'
+		# Automagic on dev-python/python-tests, could add this in future
+		--exclude 'run.test_exceptions'
+		# TODO: Unpackaged dev-python/interpreters-pep-734 (interpreters_backport)
+		# This only shows up as a failure with >=3.13.
+		--exclude 'subinterpreters_threading_stress_test'
+	)
+
+	if [[ ${EPYTHON} == pypy3* ]] ; then
+		testargs+=(
+			# Recursion issue
+			--exclude 'run.if_else_expr'
+			--exclude 'run.test_patma*'
+			# Slight output difference (missing '<')
+			--exclude 'run.cpp_exception_ptr_just_handler'
+
+		)
+	fi
+
+	# Keep test-full for numpy as it's large and doesn't pass tests itself
+	# on niche arches.
+	if ! use test-full || ! has "${EPYTHON/./_}" "${PYTHON_FULLY_TESTED[@]}"; then
+		testargs+=(
+			--exclude 'run.numpy*'
+			--exclude 'run.ufunc'
+			--exclude 'numpy*'
+		)
+	fi
+
+	"${PYTHON}" runtests.py "${testargs[@]}" || die "Tests fail with ${EPYTHON}"
 }
 
 python_install_all() {

diff --git a/dev-python/cython/metadata.xml b/dev-python/cython/metadata.xml
index 4960428b8c6b..fd01ff3d8380 100644
--- a/dev-python/cython/metadata.xml
+++ b/dev-python/cython/metadata.xml
@@ -10,6 +10,12 @@
 		language as easy as Python itself. It's based on Pyrex, but supports
 		more cutting edge functionality and optimizations.
 	</longdescription>
+	<use>
+		<flag name="test-full">
+			Run test suite in full via additional (large) test
+			dependencies, like dev-python/numpy.
+		</flag>
+	</use>
 	<upstream>
 		<remote-id type="pypi">Cython</remote-id>
 		<remote-id type="github">cython/cython</remote-id>


             reply	other threads:[~2025-05-19 14:00 UTC|newest]

Thread overview: 337+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 14:00 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-19 14:01 [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/ Sam James
2025-05-19 14:00 Sam James
2025-05-19 14:00 Sam James
2025-05-11 20:03 Sam James
2025-05-10 13:18 Sam James
2025-05-09  1:52 Michał Górny
2025-05-08  5:32 Michał Górny
2025-05-01  2:54 Michał Górny
2025-04-20  5:23 Michał Górny
2025-04-20  0:08 Sam James
2025-04-20  0:08 Sam James
2025-04-20  0:08 Sam James
2025-04-20  0:08 Sam James
2025-04-20  0:08 Sam James
2025-04-20  0:08 Sam James
2025-04-19 23:31 Sam James
2025-04-19 18:40 Arthur Zamarin
2025-04-19 18:39 Arthur Zamarin
2025-04-18 12:38 Michał Górny
2025-04-18 12:38 Michał Górny
2025-04-14  4:50 Michał Górny
2025-04-05  6:37 Michał Górny
2025-03-08 11:00 Arthur Zamarin
2025-03-08 11:00 Arthur Zamarin
2025-03-08 11:00 Arthur Zamarin
2025-03-08 11:00 Arthur Zamarin
2025-03-08 10:59 Arthur Zamarin
2025-03-08 10:59 Arthur Zamarin
2025-03-08 10:59 Arthur Zamarin
2025-02-15 14:16 Michał Górny
2025-02-12  4:16 Michał Górny
2024-10-31  5:00 Michał Górny
2024-10-30 20:51 Sam James
2024-10-30 20:51 Sam James
2024-10-08 18:22 Sam James
2024-09-01 19:46 Arthur Zamarin
2024-09-01 19:46 Arthur Zamarin
2024-09-01 19:46 Arthur Zamarin
2024-09-01 16:40 Arthur Zamarin
2024-08-24  9:05 Arthur Zamarin
2024-08-06  4:45 Michał Górny
2024-06-05 16:16 Michał Górny
2024-06-05 16:16 Michał Górny
2024-05-09 18:52 Michał Górny
2024-04-20 11:46 Sam James
2024-04-20 11:23 Michał Górny
2024-03-31  3:10 Michał Górny
2024-03-22  7:12 Sam James
2024-03-22  6:14 Arthur Zamarin
2024-03-22  6:14 Arthur Zamarin
2024-03-22  3:58 Sam James
2024-03-22  3:58 Sam James
2024-03-22  3:58 Sam James
2024-03-22  3:58 Sam James
2024-03-10 13:19 Michał Górny
2024-03-10  8:17 Sam James
2024-03-10  8:17 Sam James
2024-03-06  7:06 Michał Górny
2024-02-08  2:09 Ionen Wolkens
2024-02-08  2:09 Ionen Wolkens
2024-02-08  2:09 Ionen Wolkens
2024-02-08  2:09 Ionen Wolkens
2024-02-08  2:09 Ionen Wolkens
2024-02-08  2:09 Ionen Wolkens
2024-01-14  3:10 Sam James
2024-01-10 21:12 Michał Górny
2024-01-06 19:30 Viorel Munteanu
2024-01-04  5:41 Ionen Wolkens
2023-12-23 19:57 Arthur Zamarin
2023-12-23 19:57 Arthur Zamarin
2023-12-23 14:29 Arthur Zamarin
2023-12-22 10:05 Michał Górny
2023-12-22  5:07 Sam James
2023-12-21  0:07 Ionen Wolkens
2023-12-20  1:13 Sam James
2023-12-20  1:13 Sam James
2023-12-15 20:42 Sam James
2023-12-11  4:33 Arthur Zamarin
2023-11-26 20:23 Arthur Zamarin
2023-11-24 17:29 Arthur Zamarin
2023-11-23 19:53 Sam James
2023-11-22 11:06 Michał Górny
2023-10-31  7:53 Michał Górny
2023-10-18  5:06 Michał Górny
2023-10-01 18:18 Arthur Zamarin
2023-10-01 18:18 Arthur Zamarin
2023-09-30  9:00 Sam James
2023-09-30  5:44 Arthur Zamarin
2023-09-21 20:11 Sam James
2023-08-28  4:05 Sam James
2023-08-28  4:05 Sam James
2023-08-25 19:13 Sam James
2023-08-21 11:39 Michał Górny
2023-08-21 11:08 Sam James
2023-08-21 11:08 Sam James
2023-08-21 11:08 Sam James
2023-08-21  3:50 Sam James
2023-08-20  5:43 Sam James
2023-08-20  5:43 Sam James
2023-08-20  5:43 Sam James
2023-08-19 18:07 Arthur Zamarin
2023-08-19 16:51 Arthur Zamarin
2023-08-19 16:44 Arthur Zamarin
2023-08-19 16:23 Arthur Zamarin
2023-08-19 16:19 Arthur Zamarin
2023-08-19 16:19 Arthur Zamarin
2023-08-19 16:08 Arthur Zamarin
2023-07-17 17:53 Sam James
2023-07-13  6:05 Sam James
2023-06-27 18:30 Sam James
2023-06-27 10:19 Sam James
2023-06-27  9:08 Jakov Smolić
2023-06-27  7:54 Sam James
2023-06-27  6:34 Sam James
2023-06-27  5:19 Jakov Smolić
2023-06-27  5:19 Jakov Smolić
2023-05-27  8:55 Michał Górny
2023-05-27  7:52 Arthur Zamarin
2023-05-27  7:52 Arthur Zamarin
2023-05-25  3:18 Sam James
2023-05-25  3:18 Sam James
2023-05-24 10:05 Sam James
2023-05-24 10:03 Sam James
2023-05-24 10:01 Sam James
2023-05-24  9:18 Sam James
2023-05-24  9:18 Sam James
2023-05-23 19:15 Arthur Zamarin
2023-05-23 19:15 Arthur Zamarin
2023-05-23 17:48 Arthur Zamarin
2023-05-23 16:00 Arthur Zamarin
2023-05-23 15:47 Arthur Zamarin
2023-05-23 15:46 Arthur Zamarin
2023-05-02 17:18 Michał Górny
2023-04-02 19:38 Sam James
2023-03-31 12:19 Michał Górny
2023-03-31 11:52 Arthur Zamarin
2023-03-31 11:49 Arthur Zamarin
2023-03-31 11:49 Arthur Zamarin
2023-03-31 11:49 Arthur Zamarin
2023-03-27 16:49 Michał Górny
2023-03-25  3:32 Sam James
2023-03-25  3:32 Sam James
2023-03-16 14:04 Arthur Zamarin
2023-03-05 13:35 Arthur Zamarin
2023-02-17  0:56 Sam James
2023-01-06 15:27 Michał Górny
2022-08-31 17:38 Michał Górny
2022-08-31 12:05 Agostino Sarubbo
2022-08-31 12:05 Agostino Sarubbo
2022-08-31 12:04 Agostino Sarubbo
2022-08-31 12:03 Agostino Sarubbo
2022-08-31 10:27 Arthur Zamarin
2022-08-31  5:15 Agostino Sarubbo
2022-08-30 20:35 Sam James
2022-08-30 18:40 Jakov Smolić
2022-07-29 10:59 Michał Górny
2022-07-07  5:49 Michał Górny
2022-07-06 16:35 Arthur Zamarin
2022-06-28 15:44 Arthur Zamarin
2022-06-15  7:16 Agostino Sarubbo
2022-06-14  7:11 Agostino Sarubbo
2022-06-14  7:11 Agostino Sarubbo
2022-06-13 21:00 Jakov Smolić
2022-06-12 12:46 Sam James
2022-06-12 11:55 Sam James
2022-05-18  5:58 Michał Górny
2022-05-16 16:05 Michał Górny
2022-05-16 16:05 Michał Górny
2022-05-11 10:04 Michał Górny
2022-05-11 10:04 Michał Górny
2022-04-29  7:59 WANG Xuerui
2022-03-20 18:33 Michał Górny
2022-03-20 18:11 Arthur Zamarin
2022-03-19 19:21 Agostino Sarubbo
2022-03-18 12:26 Arthur Zamarin
2022-03-18  9:19 Arthur Zamarin
2022-03-16 23:53 Sam James
2022-03-16 19:22 Jakov Smolić
2022-03-16  8:13 Jakov Smolić
2022-02-17 19:03 Michał Górny
2022-02-07  6:57 Arthur Zamarin
2022-01-29  3:56 Sam James
2022-01-20 18:50 Sam James
2022-01-20 18:50 Sam James
2022-01-20 16:32 Arthur Zamarin
2022-01-20 14:15 Arthur Zamarin
2022-01-20 13:00 Arthur Zamarin
2022-01-20 12:27 Arthur Zamarin
2022-01-20 10:09 Arthur Zamarin
2022-01-08 13:39 Arthur Zamarin
2022-01-07 16:49 Arthur Zamarin
2022-01-07 15:30 Sam James
2022-01-07 15:29 Sam James
2022-01-06 20:14 Arthur Zamarin
2022-01-06 13:06 Sam James
2022-01-06 13:04 Sam James
2022-01-05 18:33 Arthur Zamarin
2021-12-17  2:52 Sam James
2021-12-06 19:37 Sam James
2021-12-06  1:16 Sam James
2021-11-20  7:56 Sam James
2021-10-11  2:52 Sam James
2021-10-11  2:52 Sam James
2021-10-03 21:13 Sam James
2021-10-03 18:48 Sam James
2021-10-03 17:50 Agostino Sarubbo
2021-10-02 23:17 Sam James
2021-08-25 17:29 Michał Górny
2021-08-21 22:15 James Le Cuirot
2021-07-16  6:12 Michał Górny
2021-07-15 22:13 Sergei Trofimovich
2021-07-15 21:00 Michał Górny
2021-05-20  1:46 Sam James
2021-05-19 23:41 Sam James
2021-05-19 17:28 Sam James
2021-05-19 17:25 Sam James
2021-05-19 17:22 Sam James
2021-05-19  3:23 Sam James
2021-05-14 21:39 Marek Szuba
2021-04-15  9:03 Michał Górny
2021-04-10 16:16 Sergei Trofimovich
2021-04-07 22:42 Sam James
2021-04-06 19:51 Sam James
2021-04-06 19:49 Sam James
2021-04-06 19:47 Sam James
2021-04-05 16:53 Sam James
2021-03-06  2:37 Sam James
2021-02-20 23:52 Michał Górny
2021-01-01  0:14 Michał Górny
2021-01-01  0:14 Michał Górny
2020-11-04 15:50 Sam James
2020-11-04 15:50 Sam James
2020-10-02  8:56 Mikle Kolyada
2020-10-02  7:50 Mikle Kolyada
2020-09-30 18:13 Sergei Trofimovich
2020-09-28 15:53 Michał Górny
2020-08-29 13:12 Sam James
2020-08-19  4:10 Sam James
2020-08-07 19:19 Sam James
2020-07-10  6:30 Michał Górny
2020-07-06 14:13 Michał Górny
2020-06-14 11:10 Michał Górny
2020-06-11  8:01 Michał Górny
2020-05-26  9:36 Michał Górny
2020-05-21  7:08 Michał Górny
2020-05-19  9:45 Michał Górny
2020-05-06  7:12 Michał Górny
2020-05-05 21:04 Sergei Trofimovich
2020-04-28  7:00 Michał Górny
2020-04-03 21:35 Mart Raudsepp
2020-03-07 15:45 Michał Górny
2020-03-07 15:11 Michał Górny
2020-02-16 13:51 Sergei Trofimovich
2020-02-13 13:03 Agostino Sarubbo
2020-02-11 11:30 Agostino Sarubbo
2020-02-11 11:09 Agostino Sarubbo
2020-02-11 10:58 Agostino Sarubbo
2020-02-11 10:55 Agostino Sarubbo
2020-02-11  9:52 Agostino Sarubbo
2020-02-11  9:43 Agostino Sarubbo
2020-02-11  8:36 Agostino Sarubbo
2020-02-10 10:54 Michał Górny
2020-02-10 10:54 Michał Górny
2019-11-25 12:35 Michał Górny
2019-11-21  1:56 Patrick McLean
2019-11-20 18:07 Patrick McLean
2019-11-02  8:02 Michał Górny
2019-08-28 15:38 Michał Górny
2019-08-07 15:41 Michał Górny
2019-07-26 13:14 Michał Górny
2019-07-26 13:14 Michał Górny
2019-07-08 19:43 Michał Górny
2019-07-01  7:56 Michał Górny
2019-07-01  7:56 Michał Górny
2019-06-13  4:45 Markus Meier
2019-06-08 18:15 Agostino Sarubbo
2019-06-03  2:22 Michał Górny
2019-05-30 11:37 Michał Górny
2019-05-30 11:37 Michał Górny
2019-05-04 19:20 Andreas K. Hüttel
2019-05-02 21:11 Mikle Kolyada
2019-04-29 19:48 Sergei Trofimovich
2019-04-28 20:35 Mikle Kolyada
2019-04-21 17:07 Sergei Trofimovich
2019-04-18 20:32 Thomas Deutschmann
2019-04-16  5:56 Michał Górny
2019-04-13 19:10 Agostino Sarubbo
2019-04-12 20:54 Aaron Bauman
2019-03-05 16:37 Michał Górny
2019-03-01 11:26 Michael Haubenwallner
2019-03-01  0:26 Aaron Bauman
2019-02-09  8:48 Michał Górny
2019-02-09  8:48 Michał Górny
2019-02-09  8:48 Michał Górny
2019-02-02 10:31 Michał Górny
2019-01-20 10:42 Michał Górny
2019-01-20 10:42 Michał Górny
2018-12-15  9:18 Michał Górny
2018-11-25  9:09 Michał Górny
2018-11-25  9:09 Michał Górny
2018-10-28 21:44 Michał Górny
2018-07-15  8:37 Michał Górny
2018-06-08 11:24 Mikle Kolyada
2018-04-29 11:13 Michał Górny
2018-04-29  6:15 Michał Górny
2018-04-28 19:29 Michał Górny
2018-03-21 22:40 Mart Raudsepp
2018-01-03  9:11 Michał Górny
2017-08-31 23:56 Tim Harder
2017-07-20 23:58 Tim Harder
2017-06-10 15:10 Agostino Sarubbo
2017-05-11 18:53 Markus Meier
2017-05-03  7:37 Michał Górny
2017-04-29 12:14 Jeroen Roovers
2017-04-22  7:33 Tobias Klausmann
2017-02-12 22:20 Zac Medico
2017-01-16 10:15 Jeroen Roovers
2016-12-24 10:26 Agostino Sarubbo
2016-12-18 15:44 Agostino Sarubbo
2016-12-14  9:14 Tobias Klausmann
2016-12-09  3:12 Tim Harder
2016-10-27 17:31 Kacper Kowalik
2016-10-27 17:13 Tim Harder
2016-10-27  5:38 Tim Harder
2016-10-27  5:34 Tim Harder
2016-07-17 21:03 Patrick Lauer
2016-06-20 18:41 Mike Gilbert
2016-06-17 15:20 Tim Harder
2016-03-31 11:34 Patrick Lauer
2015-10-11 20:15 Justin Lecher
2015-10-11 11:25 Justin Lecher
2015-10-01  7:03 Justin Lecher
2015-09-17 18:23 Justin Lecher
2015-09-14  8:22 Justin Lecher
2015-08-24 10:12 Justin Lecher
2015-08-09 15:18 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1747663204.6a2059bdf28fe8fe2d9639ea26c7ae1a5cc52c6e.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox