Remove unused python2 bcond

This commit is contained in:
Miro Hrončok 2022-11-10 21:11:04 +01:00
parent 54f46fa695
commit 55f28ed96d

View File

@ -1,12 +1,3 @@
# There is an exception to ship python2-pytz on Fedora, for trac:
# https://pagure.io/fesco/issue/2260
# Trac has been switched to Python 3 in Fedora 34
%if 0%{?fedora} && 0%{?fedora} < 34
%bcond_without python2
%else
%bcond_with python2
%endif
# Allow build without test
%bcond_with tests
@ -38,18 +29,6 @@ Almost all (over 540) of the Olson timezones are supported.
%description %_description
%if %{with python2}
%package -n python2-%{name}
Summary: %summary
%{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
Requires: tzdata
%description -n python2-%{name} %_description
%endif
%package -n python3-%{name}
Summary: %summary
%{?python_provide:%python_provide python3-%{name}}
@ -68,19 +47,10 @@ Requires: tzdata
%build
%if %{with python2}
%py2_build
%endif
%py3_build
%install
%if %{with python2}
%py2_install
rm -r %{buildroot}%{python2_sitelib}/pytz/zoneinfo
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib}
%endif
%py3_install
rm -r %{buildroot}%{python3_sitelib}/pytz/zoneinfo
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
@ -92,14 +62,6 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%endif
%if %{with python2}
%files -n python2-%{name}
%license LICENSE.txt
%doc README.rst
%{python2_sitelib}/pytz/
%{python2_sitelib}/*.egg-info/
%endif
%files -n python3-pytz
%license LICENSE.txt
%doc README.rst