summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-11-03 20:16:30 +0100
committerMichał Górny <mgorny@gentoo.org>2023-11-07 06:29:07 +0100
commitefb3420408bcf988abe78f92ab8aa93069dba566 (patch)
treecc50484b6b8611f473e81c3b3c773e6699ea9535 /eclass/distutils-r1.eclass
parentpython-utils-r1.eclass: Add EPYTEST_XDIST for epytest (diff)
downloadgentoo-efb3420408bcf988abe78f92ab8aa93069dba566.tar.gz
gentoo-efb3420408bcf988abe78f92ab8aa93069dba566.tar.bz2
gentoo-efb3420408bcf988abe78f92ab8aa93069dba566.zip
distutils-r1.eclass: Add pytest-xdist dep if EPYTEST_XDIST is set
Make `distutils_enable_tests pytest` automatically add the `dev-python/pytest-xdist` dependency if `EPYTEST_XDIST` is set. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3d69911d9209..3d756eaad556 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -617,6 +617,9 @@ distutils_enable_tests() {
;;
pytest)
test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]'
+ if [[ ${EPYTEST_XDIST} ]]; then
+ test_pkgs+=' dev-python/pytest-xdist[${PYTHON_USEDEP}]'
+ fi
;;
setup.py)
;;