commit:     da2edca7bbb4afd4da0c2a253751804e76b9f656
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 08:05:17 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 08:31:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da2edca7

dev-python/virtualenv: Skip tests on py2 in 16*

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/virtualenv/virtualenv-16.7.10.ebuild | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/dev-python/virtualenv/virtualenv-16.7.10.ebuild 
b/dev-python/virtualenv/virtualenv-16.7.10.ebuild
index 8bc31ec8ddd..b8f4327d4e7 100644
--- a/dev-python/virtualenv/virtualenv-16.7.10.ebuild
+++ b/dev-python/virtualenv/virtualenv-16.7.10.ebuild
@@ -26,14 +26,16 @@ RESTRICT="!test? ( test )"
 RDEPEND=">=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]"
 BDEPEND="${RDEPEND}
        test? (
-               >=dev-python/pip-19.3.1-r1[${PYTHON_USEDEP}]
-               dev-python/mock[${PYTHON_USEDEP}]
-               dev-python/pypiserver[${PYTHON_USEDEP}]
-               dev-python/pytest-localserver[${PYTHON_USEDEP}]
-               dev-python/pytest-timeout[${PYTHON_USEDEP}]
-               dev-python/pytest[${PYTHON_USEDEP}]
-               dev-python/six[${PYTHON_USEDEP}]
-               dev-python/wheel[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       >=dev-python/pip-19.3.1-r1[${PYTHON_USEDEP}]
+                       dev-python/mock[${PYTHON_USEDEP}]
+                       dev-python/pypiserver[${PYTHON_USEDEP}]
+                       dev-python/pytest-localserver[${PYTHON_USEDEP}]
+                       dev-python/pytest-timeout[${PYTHON_USEDEP}]
+                       dev-python/pytest[${PYTHON_USEDEP}]
+                       dev-python/six[${PYTHON_USEDEP}]
+                       dev-python/wheel[${PYTHON_USEDEP}]
+               ' -3)
        )"
 
 DOCS=( docs/index.rst docs/changes.rst )
@@ -53,6 +55,11 @@ distutils_enable_sphinx docs \
        dev-python/towncrier
 
 python_test() {
+       if ! python_is_python3; then
+               ewarn "Tests are skipped on py2, please test externally"
+               return
+       fi
+
        cp "${S}"/LICENSE.txt "${BUILD_DIR}"/lib || \
                die "Could not copy LICENSE.txt with ${EPYTHON}"
 

Reply via email to