summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-08-26 12:37:16 +0100
committerSam James <sam@gentoo.org>2022-08-26 12:38:12 +0100
commit43e960831dcf4bd231453f9b223e5f03e321f861 (patch)
treecefaa58bc4ccfddb5e9964035c84c6c160e26cbc /dev-python/pytest-twisted
parentsci-electronics/gtkwave: add missing dependency on gtk+[wayland] (diff)
downloadgentoo-43e960831dcf4bd231453f9b223e5f03e321f861.tar.gz
gentoo-43e960831dcf4bd231453f9b223e5f03e321f861.tar.bz2
gentoo-43e960831dcf4bd231453f9b223e5f03e321f861.zip
dev-python/pytest-twisted: fix disabling autoload
Need to do it in src_prepare before the wheel is created (the old hack doesn't work for PEP517 builds). With the fix (ignore lack of revision as did it after): ``` * CMP: =dev-python/pytest-twisted-1.13.4 with dev-python/pytest-twisted-1.13.4/image * FILES:-usr/lib/python3.10/site-packages/pytest_twisted-*.dist-info/entry_points.txt * FILES:-usr/lib/python3.11/site-packages/pytest_twisted-*.dist-info/entry_points.txt * FILES:-usr/lib/python3.8/site-packages/pytest_twisted-*.dist-info/entry_points.txt * FILES:-usr/lib/python3.9/site-packages/pytest_twisted-*.dist-info/entry_points.txt * SIZE: 0.28MiB -> 0.28MiB, 37 -> 33 files * ------> FILES(-4) SIZE(-0.22%) ``` Closes: https://bugs.gentoo.org/866677 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/pytest-twisted')
-rw-r--r--dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild (renamed from dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild)19
1 files changed, 9 insertions, 10 deletions
diff --git a/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild b/dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild
index 9f14cee4b540..c855d5fd9c88 100644
--- a/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild
+++ b/dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild
@@ -25,6 +25,12 @@ RDEPEND="
distutils_enable_tests pytest
src_prepare() {
+ # If we let pytest-twisted autoload everywhere, it breaks tests in
+ # packages that don't expect it. Apply a similar hack as for bug
+ # #661218. We can't do this in src_prepare() because the tests need
+ # autoloading enabled.
+ sed -e 's/"pytest11": \[[^]]*\]//' -i setup.py || die
+
# https://github.com/pytest-dev/pytest/issues/9280
sed -e '/^pytest_plugins =/d' -i testing/conftest.py || die
@@ -32,15 +38,8 @@ src_prepare() {
}
python_test() {
- epytest -p pytester
-}
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=pytest_twisted
-src_install() {
- # If we let pytest-twisted autoload everywhere, it breaks tests in
- # packages that don't expect it. Apply a similar hack as for bug
- # #661218. We can't do this in src_prepare() because the tests need
- # autoloading enabled.
- sed -e 's/"pytest11": \[[^]]*\]//' -i setup.py || die
-
- distutils-r1_src_install
+ epytest -p pytester
}