dev-python/flake8: Stop build from trying to install pytest-runner
authorTobias Klausmann <klausman@gentoo.org>
Wed, 7 Sep 2016 08:42:51 +0000 (10:42 +0200)
committerTobias Klausmann <klausman@gentoo.org>
Wed, 7 Sep 2016 08:45:05 +0000 (10:45 +0200)
The build system unconditionally requires pytest-runner, which we may
not install (if test is not in FEATURES). I then "helpfully" tries to
install it, causing sandbox violations.

dev-python/flake8/flake8-3.0.4.ebuild

index 841e387721aa30a68bba5184c11a944919ee2867..9dc4a498f68607b044a0e84cc764f0d813bb7f0b 100644 (file)
@@ -44,7 +44,10 @@ PDEPEND="
 
 python_prepare_all() {
        # Gentoo has flake8 support restored in >=pep8-1.6.2-r1.
-       sed -e 's:, != 1.6.2::' -i setup.py || die
+       sed -i -e 's:, != 1.6.2::' setup.py || die
+       # Flake8 falsely assumes it needs pytest-runner unconditionally and will
+       # try to install it, causing sandbox violations.
+       sed -i -e "/setup_requires=\['pytest-runner'\],/d" setup.py || die
 
        distutils-r1_python_prepare_all
 }