From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 48738158089 for ; Sat, 4 Nov 2023 06:10:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA3A32BC03E; Sat, 4 Nov 2023 06:09:15 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8B3372BC03B for ; Sat, 4 Nov 2023 06:09:15 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= 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 Message-ID: <20231104060904.26947-3-mgorny@gentoo.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231104060904.26947-1-mgorny@gentoo.org> References: <20231104060904.26947-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 61d00de0-bde4-4be9-9add-3c55fcecddc4 X-Archives-Hash: 2cc1b764e05cea56ac92516f7d05fa20 Signed-off-by: Michał Górny --- 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