Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > linux.gentoo.dev > #70526
| From | Michał Górny <mgorny@gentoo.org> |
|---|---|
| Newsgroups | linux.gentoo.dev |
| Subject | [gentoo-dev] [PATCH 1/3] python-utils-r1.eclass: Automatically enable '-p jobserver' |
| Date | 2026-05-09 15:10 +0200 |
| Message-ID | <MSPBn-3Rbc-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Automatically pass '-p jobserver' if running multiple jobs under
a jobserver, and dev-python/pytest-jobserver is intalled. If it is not
installed, emit a warning since jobserver won't be respected.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/python-utils-r1.eclass | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 462126a47970d..e7c5ed4ee4d44 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1588,6 +1588,17 @@ epytest() {
# jobs are unevenly distributed
--dist=worksteal
)
+
+ if [[ ${MAKEFLAGS} == *--jobserver-auth=* ]]; then
+ if has_version "dev-python/pytest-jobserver[${PYTHON_USEDEP}]"
+ then
+ args+=( -p jobserver )
+ elif [[ ! ${_EPYTEST_JOBSERVER_WARNED} ]]; then
+ ewarn "Jobserver found under pytest-xdist, but cannot be used without:"
+ ewarn " dev-python/pytest-jobserver"
+ _EPYTEST_JOBSERVER_WARNED=1
+ fi
+ fi
fi
fi
Back to linux.gentoo.dev | Previous | Next — Next in thread | Find similar
[gentoo-dev] [PATCH 1/3] python-utils-r1.eclass: Automatically enable '-p jobserver' Michał Górny <mgorny@gentoo.org> - 2026-05-09 15:10 +0200 [gentoo-dev] [PATCH 2/3] python-utils-r1.eclass: Use get_makeopts_jobs Michał Górny <mgorny@gentoo.org> - 2026-05-09 15:10 +0200
csiph-web