From 7e287890b16298f6e07ec8d5039265cb62510080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 13 Jun 2022 19:31:18 +0200 Subject: [PATCH] Introduce tests bcond for easier Python 3.N+1 bootstrap There is a giant dependency loop between pytest-{timeout,cov}, virtualenv and this. --- python-filelock.spec | 7 +++++++ 1 file changed, 7 insertions(+) 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