From 6c2c75b233f0d119805c89a860c9955d7d2d98cf Mon Sep 17 00:00:00 2001 From: Frédéric Pierret (fepitre) Date: Aug 10 2020 15:43:28 +0000 Subject: spec: replace hardcoded python3 Signed-off-by: Frédéric Pierret (fepitre) --- diff --git a/python-pbr.spec b/python-pbr.spec index 072c170..3bd4885 100644 --- a/python-pbr.spec +++ b/python-pbr.spec @@ -19,9 +19,9 @@ BuildArch: noarch BuildRequires: git %if %{without bootstrap} -BuildRequires: python3-sphinx >= 1.1.3 -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-sphinxcontrib-apidoc +BuildRequires: python%{python3_pkgversion}-sphinx >= 1.1.3 +BuildRequires: python%{python3_pkgversion}-openstackdocstheme +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-apidoc %endif @@ -32,29 +32,29 @@ between all of the OpenStack projects. Around the time that OpenStack hit 18 different projects each with at least 3 active branches, it seems like a good time to make that code into a proper re-usable library. -%package -n python3-%{pypi_name} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: Python Build Reasonableness -%{?python_provide:%python_provide python3-%{pypi_name}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools %if 0%{?do_test} == 1 -BuildRequires: python3-coverage -BuildRequires: python3-hacking -BuildRequires: python3-mock -BuildRequires: python3-testrepository -BuildRequires: python3-testresources -BuildRequires: python3-testscenarios +BuildRequires: python%{python3_pkgversion}-coverage +BuildRequires: python%{python3_pkgversion}-hacking +BuildRequires: python%{python3_pkgversion}-mock +BuildRequires: python%{python3_pkgversion}-testrepository +BuildRequires: python%{python3_pkgversion}-testresources +BuildRequires: python%{python3_pkgversion}-testscenarios BuildRequires: gcc BuildRequires: gnupg %endif -Requires: python3-setuptools +Requires: python%{python3_pkgversion}-setuptools Requires: git-core # /usr/bin/pbr moved from: Conflicts: python2-%{pypi_name} < 5.4.3-2 -%description -n python3-%{pypi_name} +%description -n python%{python3_pkgversion}-%{pypi_name} Manage dynamic plugins for Python applications %prep @@ -87,7 +87,7 @@ ln -s ./pbr-3 %{buildroot}%{_bindir}/pbr %{__python3} setup.py test %endif -%files -n python3-pbr +%files -n python%{python3_pkgversion}-pbr %license LICENSE %doc README.rst %if %{without bootstrap}