commit: bbc99d9e26800f182e698062bd5a02a0d8a17dc1
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 29 09:30:57 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 29 11:45:59 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbc99d9e
dev-python/setuptools: Use pytest-xdist
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/setuptools/setuptools-51.1.1.ebuild | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dev-python/setuptools/setuptools-51.1.1.ebuild
b/dev-python/setuptools/setuptools-51.1.1.ebuild
index 81b6a41f833..69dc6ffd79a 100644
--- a/dev-python/setuptools/setuptools-51.1.1.ebuild
+++ b/dev-python/setuptools/setuptools-51.1.1.ebuild
@@ -7,7 +7,7 @@ DISTUTILS_USE_SETUPTOOLS=manual
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
PYTHON_REQ_USE="xml(+)"
-inherit distutils-r1
+inherit distutils-r1 multiprocessing
DESCRIPTION="Collection of extensions to Distutils"
HOMEPAGE="https://github.com/pypa/setuptools
https://pypi.org/project/setuptools/"
@@ -24,6 +24,7 @@ BDEPEND="
dev-python/pip[${PYTHON_USEDEP}]
dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
>=dev-python/virtualenv-20[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
)
@@ -42,12 +43,17 @@ DOCS=( {CHANGES,README}.rst )
python_test() {
distutils_install_for_testing --via-root
local deselect=(
+ # TODO
setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts
+ # this one's unhappy about pytest-xdist but one test is not
worth
+ # losing the speed gain
+
setuptools/tests/test_build_meta.py::TestBuildMetaBackend::test_build_sdist_relative_path_import
)
# test_easy_install raises a SandboxViolation due to
${HOME}/.pydistutils.cfg
# It tries to sandbox the test in a tempdir
- HOME="${PWD}" pytest -vv setuptools ${deselect[@]/#/--deselect } ||
- die "Tests failed under ${EPYTHON}"
+ HOME="${PWD}" pytest -vv ${deselect[@]/#/--deselect } \
+ -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \
+ setuptools || die "Tests failed under ${EPYTHON}"
}
python_install() {