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