Disable python 2 package on F >= 31

epel9
Lubomír Sedlář 6 years ago
parent a0c985e6f3
commit e149b86668

@ -1,6 +1,12 @@
%if 0%{?fedora} >= 31
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-multilib Name: python-multilib
Version: 1.2 Version: 1.2
Release: 7%{?dist} Release: 8%{?dist}
Summary: A module for determining if a package is multilib or not Summary: A module for determining if a package is multilib or not
License: GPLv2 License: GPLv2
URL: https://pagure.io/releng/python-multilib URL: https://pagure.io/releng/python-multilib
@ -22,11 +28,12 @@ Summary: Configuration files for %{name}
%description conf %description conf
This package provides the configuration files for %{name}. This package provides the configuration files for %{name}.
%if 0%{?with_python2}
%package -n python2-multilib %package -n python2-multilib
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python2-multilib} %{?python_provide:%python_provide python2-multilib}
BuildRequires: python2-devel BuildRequires: python2-devel
%if 0%{?fedora} || %{?rhel} >= 8 %if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: python2-setuptools BuildRequires: python2-setuptools
BuildRequires: python2-six BuildRequires: python2-six
Requires: python2-six Requires: python2-six
@ -39,6 +46,7 @@ Requires: python2
Requires: %{name}-conf = %{version}-%{release} Requires: %{name}-conf = %{version}-%{release}
%description -n python2-multilib %{_description} %description -n python2-multilib %{_description}
%endif
%package -n python%{python3_pkgversion}-multilib %package -n python%{python3_pkgversion}-multilib
Summary: %{summary} Summary: %{summary}
@ -57,11 +65,15 @@ Requires: %{name}-conf = %{version}-%{release}
%setup -q %setup -q
%build %build
%if 0%{?with_python2}
%py2_build %py2_build
%endif
%py3_build %py3_build
%install %install
%if 0%{?with_python2}
%py2_install %py2_install
%endif
%py3_install %py3_install
%check %check
@ -73,10 +85,12 @@ Requires: %{name}-conf = %{version}-%{release}
%files conf %files conf
%config(noreplace) %{_sysconfdir}/multilib.conf %config(noreplace) %{_sysconfdir}/multilib.conf
%if 0%{?with_python2}
%files -n python2-multilib %files -n python2-multilib
%license LICENSE %license LICENSE
%doc README.md %doc README.md
%{python2_sitelib}/* %{python2_sitelib}/*
%endif
%files -n python%{python3_pkgversion}-multilib %files -n python%{python3_pkgversion}-multilib
%license LICENSE %license LICENSE
@ -85,6 +99,9 @@ Requires: %{name}-conf = %{version}-%{release}
%changelog %changelog
* Mon Mar 11 2019 Lubomír Sedlář <lsedlar@redhat.com> - 1.2-8
- Disable python2 package on F >= 31
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7 * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

Loading…
Cancel
Save