From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-twisted/
Date: Fri, 26 Aug 2022 11:38:19 +0000 (UTC) [thread overview]
Message-ID: <1661513892.43e960831dcf4bd231453f9b223e5f03e321f861.sam@gentoo> (raw)
commit: 43e960831dcf4bd231453f9b223e5f03e321f861
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 26 11:37:16 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 11:38:12 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43e96083
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 <AT> gentoo.org>
...-1.13.4.ebuild => pytest-twisted-1.13.4-r1.ebuild} | 19 +++++++++----------
1 file 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
similarity index 93%
rename from dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild
rename to 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
}
next reply other threads:[~2022-08-26 11:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 11:38 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-28 12:59 [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-twisted/ Michał Górny
2024-09-28 12:32 Arthur Zamarin
2024-09-10 16:28 Michał Górny
2024-07-27 10:06 Michał Górny
2024-07-27 8:53 Arthur Zamarin
2024-07-11 11:59 Michał Górny
2024-07-11 3:25 Michał Górny
2024-07-09 15:30 Michał Górny
2024-06-05 15:42 Michał Górny
2024-06-03 2:38 Sam James
2024-04-06 12:41 Michał Górny
2024-04-06 12:41 Michał Górny
2024-04-06 12:32 Arthur Zamarin
2024-04-06 12:32 Arthur Zamarin
2024-03-19 7:20 Michał Górny
2022-11-19 16:54 Michał Górny
2022-11-19 16:40 Sam James
2022-11-19 16:40 Sam James
2022-10-18 7:26 Michał Górny
2022-10-14 5:49 Joonas Niilola
2022-10-14 1:28 Sam James
2022-10-10 23:40 Sam James
2022-09-16 2:52 Yixun Lan
2022-08-26 15:42 Arthur Zamarin
2022-08-26 15:42 Arthur Zamarin
2022-08-26 11:42 Sam James
2022-08-26 9:58 Arthur Zamarin
2022-08-26 7:22 Sam James
2022-08-26 7:22 Sam James
2022-08-26 7:22 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1661513892.43e960831dcf4bd231453f9b223e5f03e321f861.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox