Closes: https://bugs.gentoo.org/926964
Signed-off-by: Michał Górny <mgo...@gentoo.org>
---
 eclass/distutils-r1.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index a1617999a037..22b28e915859 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -628,11 +628,11 @@ distutils_enable_tests() {
                        ;;
                unittest)
                        # unittest-or-fail is needed in py<3.12
-                       test_deps+="
-                               $(python_gen_cond_dep '
+                       local test_pkgs="$(python_gen_cond_dep '
                                        
dev-python/unittest-or-fail[${PYTHON_USEDEP}]
-                               ' 3.10 3.11)
-                       "
+                               ' 3.10 3.11
+                       )"
+                       [[ -n ${test_pkgs} ]] && test_deps+=" ${test_pkgs}"
                        ;;
                *)
                        die "${FUNCNAME}: unsupported argument: ${1}"
-- 
2.44.0


Reply via email to