public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/6] distutils-r1.eclass: Refactor d_e_t to permit multiple test packages
Date: Sat,  4 Nov 2023 07:05:11 +0100	[thread overview]
Message-ID: <20231104060904.26947-3-mgorny@gentoo.org> (raw)
In-Reply-To: <20231104060904.26947-1-mgorny@gentoo.org>

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/distutils-r1.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 9dd091921391..3d69911d9209 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -610,13 +610,13 @@ distutils_enable_tests() {
 	[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
 
 	local test_deps=${RDEPEND}
-	local test_pkg
+	local test_pkgs
 	case ${1} in
 		nose)
-			test_pkg=">=dev-python/nose-1.3.7_p20221026"
+			test_pkgs='>=dev-python/nose-1.3.7_p20221026[${PYTHON_USEDEP}]'
 			;;
 		pytest)
-			test_pkg=">=dev-python/pytest-7.3.1"
+			test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]'
 			;;
 		setup.py)
 			;;
@@ -635,12 +635,12 @@ distutils_enable_tests() {
 	_DISTUTILS_TEST_RUNNER=${1}
 	python_test() { distutils-r1_python_test; }
 
-	if [[ -n ${test_pkg} ]]; then
+	if [[ -n ${test_pkgs} ]]; then
 		if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
-			test_deps+=" ${test_pkg}[${PYTHON_USEDEP}]"
+			test_deps+=" ${test_pkgs//'${PYTHON_USEDEP}'/${PYTHON_USEDEP}}"
 		else
 			test_deps+=" $(python_gen_cond_dep "
-				${test_pkg}[\${PYTHON_USEDEP}]
+				${test_pkgs}
 			")"
 		fi
 	fi
-- 
2.42.0



  parent reply	other threads:[~2023-11-04  6:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04  6:05 [gentoo-dev] [PATCH 0/6] python-utils-r1/distutils-r1: EPYTEST_XDIST support Michał Górny
2023-11-04  6:05 ` [gentoo-dev] [PATCH 1/6] distutils-r1.eclass: Refactor `d_e_t unittest` (NFC) Michał Górny
2023-11-04  6:05 ` Michał Górny [this message]
2023-11-04  6:05 ` [gentoo-dev] [PATCH 3/6] python-utils-r1.eclass: Add EPYTEST_XDIST for epytest Michał Górny
2023-11-04  6:05 ` [gentoo-dev] [PATCH 4/6] distutils-r1.eclass: Add pytest-xdist dep if EPYTEST_XDIST is set Michał Górny
2023-11-04  6:05 ` [gentoo-dev] [PATCH 5/6] dev-python/pyrate-limiter: Use EPYTEST_XDIST Michał Górny
2023-11-04  6:05 ` [gentoo-dev] [PATCH 6/6] dev-python/numpy: Switch to EPYTEST_XDIST Michał Górny

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=20231104060904.26947-3-mgorny@gentoo.org \
    --to=mgorny@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