From 54b3904b0a94088b6b454fae0177afc3d8c6be35 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Fri, 4 Sep 2020 08:21:03 +0200 Subject: [PATCH] Use `%{python3_pkgversion}` to make the specfile more universal --- python-wheel.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/python-wheel.spec b/python-wheel.spec index ee0d7c2..f5bdf19 100644 --- a/python-wheel.spec +++ b/python-wheel.spec @@ -23,15 +23,15 @@ URL: https://github.com/pypa/wheel Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools # python3 bootstrap: this is rebuilt before the final build of python3, which # adds the dependency on python3-rpm-generators, so we require it manually BuildRequires: python3-rpm-generators %if %{with tests} -BuildRequires: python3-pytest +BuildRequires: python%{python3_pkgversion}-pytest # several tests compile extensions # those tests are skipped if gcc is not found BuildRequires: gcc @@ -50,9 +50,9 @@ It has two different roles: %description %{_description} -%package -n python3-%{pypi_name} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} -%description -n python3-%{pypi_name} %{_description} +%description -n python%{python3_pkgversion}-%{pypi_name} %{_description} %if %{without bootstrap} @@ -92,8 +92,7 @@ rm setup.cfg # to drop pytest coverage options configured there %pytest -v --ignore build %endif - -%files -n python3-%{pypi_name} +%files -n python%{python3_pkgversion}-%{pypi_name} %license LICENSE.txt %doc README.rst %{_bindir}/%{pypi_name}