Add a bcond to allow building without tests

Always run at least an import check.
epel10
Miro Hrončok 9 months ago
parent f36bd80115
commit 0f8d2d68e4

@ -18,6 +18,10 @@ general purpose that they don't belong in Zope application-specific packages.
Summary: Zope Exceptions Summary: Zope Exceptions
BuildRequires: python3-devel 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 %description -n python3-zope-exceptions
This package contains exception interfaces and implementations which are so This package contains exception interfaces and implementations which are so
general purpose that they don't belong in Zope application-specific packages. 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} %autosetup -n %{modname}-%{version}
%generate_buildrequires %generate_buildrequires
%pyproject_buildrequires -t %pyproject_buildrequires %{?with_tests:-t}
%build %build
%pyproject_wheel %pyproject_wheel
@ -36,7 +40,10 @@ general purpose that they don't belong in Zope application-specific packages.
%pyproject_save_files zope %pyproject_save_files zope
%check %check
%pyproject_check_import
%if %{with tests}
%tox %tox
%endif
%files -n python3-zope-exceptions -f %{pyproject_files} %files -n python3-zope-exceptions -f %{pyproject_files}
%doc CHANGES.rst README.rst %doc CHANGES.rst README.rst

Loading…
Cancel
Save