diff options
-rw-r--r-- | dev-python/pip/pip-19.3.1-r1.ebuild | 1 | ||||
-rw-r--r-- | dev-python/scripttest/scripttest-1.3.0.ebuild | 13 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 5 | ||||
-rwxr-xr-x | eclass/tests/python-utils-r1.sh | 34 |
4 files changed, 41 insertions, 12 deletions
diff --git a/dev-python/pip/pip-19.3.1-r1.ebuild b/dev-python/pip/pip-19.3.1-r1.ebuild index 9908ffa9dbb2..5db9420caa27 100644 --- a/dev-python/pip/pip-19.3.1-r1.ebuild +++ b/dev-python/pip/pip-19.3.1-r1.ebuild @@ -47,6 +47,7 @@ DEPEND=" <dev-python/pytest-xdist-1.28.0[${PYTHON_USEDEP}] dev-python/pyyaml[${PYTHON_USEDEP}] dev-python/scripttest[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] dev-python/wheel[${PYTHON_USEDEP}] ) " diff --git a/dev-python/scripttest/scripttest-1.3.0.ebuild b/dev-python/scripttest/scripttest-1.3.0.ebuild index d505e0bd6127..476a53290c92 100644 --- a/dev-python/scripttest/scripttest-1.3.0.ebuild +++ b/dev-python/scripttest/scripttest-1.3.0.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) +EAPI=7 +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) inherit distutils-r1 @@ -15,12 +15,7 @@ SRC_URI="https://github.com/pypa/scripttest/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="amd64 x86" -IUSE="test" -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] - test? ( dev-python/pytest[${PYTHON_USEDEP}] )" -RDEPEND="" +BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" -python_test() { - esetup.py test -} +distutils_enable_tests pytest diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 647eb04344d2..44337c687aad 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -183,10 +183,9 @@ _python_impl_matches() { for pattern; do if [[ ${pattern} == -2 ]]; then - ! python_is_python3 "${impl}" - return + python_is_python3 "${impl}" || return 0 elif [[ ${pattern} == -3 ]]; then - python_is_python3 "${impl}" + python_is_python3 "${impl}" && return 0 return # unify value style to allow lax matching elif [[ ${impl/./_} == ${pattern/./_} ]]; then diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index e7c533d5f337..e883da38cead 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -192,6 +192,40 @@ test_is "_python_impl_supported pypy" 0 test_is "_python_impl_supported pypy3" 0 test_is "_python_impl_supported jython2_7" 0 +# check _python_impl_matches behavior +test_is "_python_impl_matches python2_7 -2" 0 +test_is "_python_impl_matches python3_6 -2" 1 +test_is "_python_impl_matches python3_7 -2" 1 +test_is "_python_impl_matches pypy -2" 0 +test_is "_python_impl_matches pypy3 -2" 1 +test_is "_python_impl_matches python2_7 -3" 1 +test_is "_python_impl_matches python3_6 -3" 0 +test_is "_python_impl_matches python3_7 -3" 0 +test_is "_python_impl_matches pypy -3" 1 +test_is "_python_impl_matches pypy3 -3" 0 +test_is "_python_impl_matches python2_7 -2 python3_6" 0 +test_is "_python_impl_matches python3_6 -2 python3_6" 0 +test_is "_python_impl_matches python3_7 -2 python3_6" 1 +test_is "_python_impl_matches pypy -2 python3_6" 0 +test_is "_python_impl_matches pypy3 -2 python3_6" 1 +test_is "_python_impl_matches python2_7 pypy3 -2 python3_6" 0 +test_is "_python_impl_matches python3_6 pypy3 -2 python3_6" 0 +test_is "_python_impl_matches python3_7 pypy3 -2 python3_6" 1 +test_is "_python_impl_matches pypy pypy3 -2 python3_6" 0 +test_is "_python_impl_matches pypy3 pypy3 -2 python3_6" 0 +set -f +test_is "_python_impl_matches python2_7 pypy*" 1 +test_is "_python_impl_matches python3_6 pypy*" 1 +test_is "_python_impl_matches python3_7 pypy*" 1 +test_is "_python_impl_matches pypy pypy*" 0 +test_is "_python_impl_matches pypy3 pypy*" 0 +test_is "_python_impl_matches python2_7 python*" 0 +test_is "_python_impl_matches python3_6 python*" 0 +test_is "_python_impl_matches python3_7 python*" 0 +test_is "_python_impl_matches pypy python*" 1 +test_is "_python_impl_matches pypy3 python*" 1 +set +f + rm "${tmpfile}" texit |