public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-lazr-config] epel10: Fix for zope-testrunner being invoked with python3 -sP
@ 2026-11-24 20:45 Michel Lind
0 siblings, 0 replies; only message in thread
From: Michel Lind @ 2026-11-24 20:45 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-lazr-config
Branch : epel10
Commit : 056e6686bc534c57fc6cd48013ab8977793fc8e1
Author : Michel Lind <salimma@fedoraproject.org>
Date : 2023-09-13T15:41:41-05:00
Stats : +35/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-lazr-config/c/056e6686bc534c57fc6cd48013ab8977793fc8e1?branch=epel10
Log:
Fix for zope-testrunner being invoked with python3 -sP
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
---
diff --git a/lazr.config-avoid-python-sP.diff b/lazr.config-avoid-python-sP.diff
new file mode 100644
index 0000000..fbe61e2
--- /dev/null
+++ b/lazr.config-avoid-python-sP.diff
@@ -0,0 +1,32 @@
+Since zope-testrunner is invoked with python3 -sP on Fedora,
+it seems to cause an issue because lazr.delegates is in system sitelib
+but lazr.config is in buildroot.
+
+On EPEL 9, where the shebang is python3 -s, this works.
+
+Sidestep the issue by invoking python -sm zope.testrunner rather than
+invoking zope-testrunner via its wrapper
+
+h/t churchyard
+```
+Test-module import failures:
+Module: lazr.config.tests.test_config
+ModuleNotFoundError: No module named 'lazr.config'
+Module: lazr.config.tests.test_docs
+ModuleNotFoundError: No module named 'lazr.config'
+Test-modules with import problems:
+ lazr.config.tests.test_config
+ lazr.config.tests.test_docs
+Total: 0 tests, 0 failures, 2 errors and 0 skipped in 0.000 seconds.
+```
+--- a/tox.ini
++++ b/tox.ini
+@@ -16,7 +16,7 @@ skip_missing_interpreters = True
+ deps =
+ zope.testrunner
+ commands =
+- zope-testrunner --test-path src --tests-pattern ^tests {posargs}
++ python -sm zope.testrunner --test-path src --tests-pattern ^tests {posargs}
+
+ [testenv:pre-commit]
+ # necessary to build the woke linter
diff --git a/python-lazr-config.spec b/python-lazr-config.spec
index b24c5ff..70b22d8 100644
--- a/python-lazr-config.spec
+++ b/python-lazr-config.spec
@@ -6,6 +6,9 @@ Summary: Create configuration schemas, and process and validate configura
License: LGPL-3.0-only
URL: https://launchpad.net/lazr.config
Source: %{pypi_source lazr.config}
+# /usr/bin/zope-testrunner could not find lazr.config due to lazr.delegates being in
+# a different directory *and* being invoked with python -sP
+Patch: lazr.config-avoid-python-sP.diff
BuildArch: noarch
BuildRequires: python3-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-24 20:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 20:45 [rpms/python-lazr-config] epel10: Fix for zope-testrunner being invoked with python3 -sP Michel Lind
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox