diff --git a/python-filelock.spec b/python-filelock.spec index 4b8fc98..a7a992d 100644 --- a/python-filelock.spec +++ b/python-filelock.spec @@ -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