Make it build

- explicitly BR setuptools and make sure egg-info is a directory
- there is no more python2-pytest
- remove old provides
This commit is contained in:
Miro Hrončok 2020-01-05 14:44:41 +01:00
parent 8e645873fd
commit 1513d3a1db

View File

@ -36,13 +36,8 @@ Almost all (over 540) of the Olson timezones are supported.
Summary: %summary
%{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-devel
%if %{with tests}
BuildRequires: python2-pytest
%endif
BuildRequires: python2-setuptools
Requires: tzdata
# Remove before F30
Provides: pytz = %{version}-%{release}
Obsoletes: pytz < %{version}-%{release}
%description -n python2-%{name} %_description
%endif
@ -52,6 +47,7 @@ Obsoletes: pytz < %{version}-%{release}
Summary: %summary
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest
%endif
@ -85,9 +81,6 @@ pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
%check
%if %{with tests}
%if %{with python2}
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v
%endif
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%endif
@ -97,14 +90,14 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%license LICENSE.txt
%doc README.txt
%{python2_sitelib}/pytz/
%{python2_sitelib}/*.egg-info
%{python2_sitelib}/*.egg-info/
%endif
%files -n python3-pytz
%license LICENSE.txt
%doc README.txt
%{python3_sitelib}/pytz/
%{python3_sitelib}/*.egg-info
%{python3_sitelib}/*.egg-info/
%changelog