dev-python/pytest: Fix tests on initial install
authorMichał Górny <mgorny@gentoo.org>
Wed, 13 May 2020 08:30:53 +0000 (10:30 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 13 May 2020 09:02:59 +0000 (11:02 +0200)
Closes: https://bugs.gentoo.org/715318
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/pytest/pytest-4.6.10.ebuild

index eb17b00753d9546ff922abef3be2ffe12fa7d8d3..ebd5ee838156e67cacf63ebd1542d65f6f598cd6 100644 (file)
@@ -3,6 +3,7 @@
 
 EAPI=7
 
+DISTUTILS_USE_SETUPTOOLS=rdepend
 PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
 
 inherit distutils-r1
@@ -41,7 +42,6 @@ RDEPEND="
 
 # flake cause a number of tests to fail
 DEPEND="
-       dev-python/setuptools[${PYTHON_USEDEP}]
        test? (
                ${RDEPEND}
                dev-python/argcomplete[${PYTHON_USEDEP}]
@@ -72,6 +72,8 @@ python_prepare_all() {
 }
 
 python_test() {
+       distutils_install_for_testing
+
        # In v4.1.1, pytest started being picky about its own verbosity options.
        # running pytest on itself with -vv made 3 tests fail. This is why we don't
        # have it below.