Introduce tests bcond for easier Python 3.N+1 bootstrap

There is a giant dependency loop between pytest-{timeout,cov}, virtualenv and this.
epel9
Miro Hrončok 3 years ago
parent 6f211af7ec
commit 7e287890b1

@ -5,6 +5,7 @@
%else
%bcond_with docs
%endif
%bcond_without tests
Name: python-%{srcname}
Version: 3.3.1
@ -19,11 +20,13 @@ BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
%if %{with tests}
# We cannot install extra dependencies because there are some
# we do not have in Fedora like covdefaults in testing or furo in docs.
# Test dependencies
BuildRequires: python3-pytest
BuildRequires: python3-pytest-timeout
%endif
%if %{with docs}
# Doc dependencies
BuildRequires: python3-sphinx
@ -87,7 +90,11 @@ install -p -m0644 -D docs/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname
%endif
%check
%if %{with tests}
%pytest
%else
%pyproject_check_import
%endif
%if %{with docs}
%files doc

Loading…
Cancel
Save