From 0f8d2d68e4b770851a1f22de24c52f8ad9fe1df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 30 May 2024 22:04:25 +0200 Subject: [PATCH] Add a bcond to allow building without tests Always run at least an import check. --- python-zope-exceptions.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python-zope-exceptions.spec b/python-zope-exceptions.spec index 27d6562..6e3494a 100644 --- a/python-zope-exceptions.spec +++ b/python-zope-exceptions.spec @@ -18,6 +18,10 @@ general purpose that they don't belong in Zope application-specific packages. Summary: Zope Exceptions BuildRequires: python3-devel +# There is a test dependency loop, so we need a way to build this without tests +# zope.exceptions -> zope.testrunner-> zope.exceptions +%bcond tests 1 + %description -n python3-zope-exceptions This package contains exception interfaces and implementations which are so general purpose that they don't belong in Zope application-specific packages. @@ -26,7 +30,7 @@ general purpose that they don't belong in Zope application-specific packages. %autosetup -n %{modname}-%{version} %generate_buildrequires -%pyproject_buildrequires -t +%pyproject_buildrequires %{?with_tests:-t} %build %pyproject_wheel @@ -36,7 +40,10 @@ general purpose that they don't belong in Zope application-specific packages. %pyproject_save_files zope %check +%pyproject_check_import +%if %{with tests} %tox +%endif %files -n python3-zope-exceptions -f %{pyproject_files} %doc CHANGES.rst README.rst