summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-07-12 21:39:42 +0200
committerMichał Górny <mgorny@gentoo.org>2020-07-12 22:19:44 +0200
commitc8450538b10b235ace13d324021308dbf5ad9604 (patch)
treee3b62f1fb1e630f93867cc15c88cf82bf5a5ff5d /dev-python/setuptools
parentdev-python/setuptools: Bump to 49.2.0 (diff)
downloadgentoo-c8450538b10b235ace13d324021308dbf5ad9604.tar.gz
gentoo-c8450538b10b235ace13d324021308dbf5ad9604.tar.bz2
gentoo-c8450538b10b235ace13d324021308dbf5ad9604.zip
dev-python/setuptools: Disable tests on py2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/setuptools')
-rw-r--r--dev-python/setuptools/setuptools-44.1.0.ebuild20
-rw-r--r--dev-python/setuptools/setuptools-46.4.0-r1.ebuild20
2 files changed, 24 insertions, 16 deletions
diff --git a/dev-python/setuptools/setuptools-44.1.0.ebuild b/dev-python/setuptools/setuptools-44.1.0.ebuild
index 56fd5bdf49f2..9e87131b2a19 100644
--- a/dev-python/setuptools/setuptools-44.1.0.ebuild
+++ b/dev-python/setuptools/setuptools-44.1.0.ebuild
@@ -27,15 +27,14 @@ RESTRICT="!test? ( test )"
BDEPEND="
app-arch/unzip
test? (
- dev-python/mock[${PYTHON_USEDEP}]
- dev-python/pip[${PYTHON_USEDEP}]
- >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
- dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
- dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
- dev-python/wheel[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
- dev-python/futures[${PYTHON_USEDEP}]
- ' -2)
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pip[${PYTHON_USEDEP}]
+ >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
+ dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
+ dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ ' -3)
)
"
PDEPEND="
@@ -68,6 +67,11 @@ python_prepare_all() {
}
python_test() {
+ if ! python_is_python3; then
+ einfo "Tests are skipped on py2 to untangle deps"
+ return
+ fi
+
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
# It tries to sandbox the test in a tempdir
HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
diff --git a/dev-python/setuptools/setuptools-46.4.0-r1.ebuild b/dev-python/setuptools/setuptools-46.4.0-r1.ebuild
index c78752db8a17..84c903df0f5f 100644
--- a/dev-python/setuptools/setuptools-46.4.0-r1.ebuild
+++ b/dev-python/setuptools/setuptools-46.4.0-r1.ebuild
@@ -21,15 +21,14 @@ RESTRICT="!test? ( test )"
BDEPEND="
app-arch/unzip
test? (
- dev-python/mock[${PYTHON_USEDEP}]
- dev-python/pip[${PYTHON_USEDEP}]
- >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
- dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
- dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
- dev-python/wheel[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
- dev-python/futures[${PYTHON_USEDEP}]
- ' -2)
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pip[${PYTHON_USEDEP}]
+ >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
+ dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
+ dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ ' -3)
)
"
PDEPEND="
@@ -63,6 +62,11 @@ python_prepare_all() {
}
python_test() {
+ if ! python_is_python3; then
+ einfo "Tests are skipped on py2 to untangle deps"
+ return
+ fi
+
distutils_install_for_testing
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
# It tries to sandbox the test in a tempdir