diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-11-03 20:10:27 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-11-07 06:29:06 +0100 |
commit | 5ac206714e6c2a6424c974477fe2ae8e5108da64 (patch) | |
tree | 5b0b0182d736417298c93eadffee39f8a28b01be /eclass | |
parent | distutils-r1.eclass: Refactor `d_e_t unittest` (NFC) (diff) | |
download | gentoo-5ac206714e6c2a6424c974477fe2ae8e5108da64.tar.gz gentoo-5ac206714e6c2a6424c974477fe2ae8e5108da64.tar.bz2 gentoo-5ac206714e6c2a6424c974477fe2ae8e5108da64.zip |
distutils-r1.eclass: Refactor d_e_t to permit multiple test packages
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 12 |
1 files 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 |