Fallback to import check when built without tests
This commit is contained in:
parent
618215c4a9
commit
d65c71576f
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user