public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michel Lind <salimma@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/python-lazr-config] epel10: Fix for zope-testrunner being invoked with python3 -sP
Date: Tue, 24 Nov 2026 20:45:33 GMT	[thread overview]
Message-ID: <179555313373.1.10969592826080318530.rpms-python-lazr-config-056e6686bc53@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-11-24 20:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=179555313373.1.10969592826080318530.rpms-python-lazr-config-056e6686bc53@fedoraproject.org \
    --to=salimma@fedoraproject.org \
    --cc=git-commits@fedoraproject.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