diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-05-23 16:54:38 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-05-23 17:41:32 +0200 |
commit | ab40c52eae86c4134950de7b9db4bcb5b34b2f74 (patch) | |
tree | e93339acee5842fd77e5488dbc9b3e34728ca8aa /eclass | |
parent | python-utils-r1.eclass: use std test runner in eunittest in 3.12+ (diff) | |
download | gentoo-ab40c52eae86c4134950de7b9db4bcb5b34b2f74.tar.gz gentoo-ab40c52eae86c4134950de7b9db4bcb5b34b2f74.tar.bz2 gentoo-ab40c52eae86c4134950de7b9db4bcb5b34b2f74.zip |
distutils-r1.eclass: Use unittest-or-fail on Python < 3.12 only
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index f4ef89ee792e..dbc4b9ccefd0 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -605,7 +605,7 @@ distutils_enable_tests() { setup.py) ;; unittest) - test_pkg="dev-python/unittest-or-fail" + # dep handled below ;; *) die "${FUNCNAME}: unsupported argument: ${1}" @@ -623,6 +623,13 @@ distutils_enable_tests() { ${test_pkg}[\${PYTHON_USEDEP}] ")" fi + elif [[ ${1} == unittest ]]; then + # unittest-or-fail is needed in py<3.12 + test_deps+=" + $(python_gen_cond_dep ' + dev-python/unittest-or-fail[${PYTHON_USEDEP}] + ' 3.{9..11}) + " fi if [[ -n ${test_deps} ]]; then IUSE+=" test" |