Move BuildRequires out of the package tag

This commit is contained in:
Sérgio M. Basto 2019-10-22 02:09:14 +01:00
commit 9bf018fd89

View file

@ -29,17 +29,22 @@ Source0: https://files.pythonhosted.org/packages/source/h/%{upname}/%{upn
BuildArch: noarch
BuildRequires: help2man
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-pytest
%endif
%if %{with python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%endif
%description
%{common_desc}
%if %{with python2}
%package -n python2-%{upname}
Summary: %{common_sum}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-pytest
%if !%{with python3}
Provides: %{upname} = %{version}-%{release}
%endif
@ -47,14 +52,10 @@ Provides: %{upname} = %{version}-%{release}
%description -n python2-%{upname}
%{common_desc}
%endif
%if %{with python3}
%package -n python3-%{upname}
Summary: %{common_sum}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
Provides: %{upname} = %{version}-%{release}
%if !%{with python2}
Obsoletes: python2-%{upname} <= %{version}-%{release}
@ -63,7 +64,6 @@ Obsoletes: python2-%{upname} <= %{version}-%{release}
%description -n python3-%{upname}
%{common_desc}
%endif
%prep