summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-07-15 07:23:30 +0200
committerMichał Górny <mgorny@gentoo.org>2025-07-18 06:39:10 +0200
commitcc63aaba87ed789e8155d0eb1f3f9f2b5a77b67f (patch)
tree4059f848d3ac2167f410a115d3781c4eb07fc57c /eclass/python-utils-r1.eclass
parentbe83627b1a634c56ffbadc79ddb73ba01c602b1d (diff)
downloadgentoo-cc63aaba87ed789e8155d0eb1f3f9f2b5a77b67f.tar.gz
gentoo-cc63aaba87ed789e8155d0eb1f3f9f2b5a77b67f.tar.bz2
gentoo-cc63aaba87ed789e8155d0eb1f3f9f2b5a77b67f.zip
python-utils-r1.eclass: Preserve order in PYTEST_PLUGINS
Do not sort entry points when adding them to `PYTEST_PLUGINS`. Apparently, the order of loading does matter, and reordering the entry points from `dev-python/pytest-xdist` leads to warnings that break the test suite of `dev-python/inline-snapshot`. Signed-off-by: Michał Górny <mgorny@gentoo.org> Part-of: https://github.com/gentoo/gentoo/pull/43007 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 68faa9e2adf9..9cdfdc87019f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1458,11 +1458,13 @@ epytest() {
from importlib.metadata import distribution, entry_points
packages = {distribution(x).name for x in sys.argv[1:]}
- plugins = {
+ # In packages defining multiple entry points, we must
+ # list them in the same order!
+ plugins = (
x.value for x in entry_points(group="pytest11")
if x.dist.name in packages
- }
- sys.stdout.write(",".join(sorted(plugins)))
+ )
+ sys.stdout.write(",".join(plugins))
EOF
)
else