From d65c71576fbf8152ae50be25e5dae6189aae0059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 10 Feb 2023 19:11:50 +0100 Subject: [PATCH] Fallback to import check when built without tests --- python-dateutil.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-dateutil.spec b/python-dateutil.spec index 87d0a70..deb76be 100644 --- a/python-dateutil.spec +++ b/python-dateutil.spec @@ -42,11 +42,12 @@ Summary: %summary BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm +# Runtime deps +BuildRequires: python3-six %if %{with tests} BuildRequires: python3-freezegun BuildRequires: python3-hypothesis BuildRequires: python3-pytest -BuildRequires: python3-six %endif Requires: tzdata %{?python_provide:%python_provide python3-%{modname}} @@ -75,9 +76,11 @@ make -C docs html %install %py3_install -%if %{with tests} %check +%if %{with tests} %{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning +%else +%py3_check_import dateutil dateutil.easter dateutil.parser dateutil.relativedelta dateutil.rrule dateutil.tz dateutil.utils dateutil.zoneinfo %endif %files -n python3-%{modname}