Use %{python3_pkgversion} to make specfile more universal

This commit is contained in:
Lumir Balhar 2020-09-07 12:17:41 +02:00
parent eaf2953d69
commit 8d87885d58

View File

@ -21,35 +21,35 @@ URL: https://github.com/pypa/packaging
Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-setuptools BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python3-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python3-pyparsing BuildRequires: python%{python3_pkgversion}-pyparsing
BuildRequires: python3-six BuildRequires: python%{python3_pkgversion}-six
%if %{with tests} %if %{with tests}
BuildRequires: python3-pytest BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python3-pretend BuildRequires: python%{python3_pkgversion}-pretend
%endif %endif
%if %{with docs} %if %{with docs}
BuildRequires: python3-sphinx BuildRequires: python%{python3_pkgversion}-sphinx
%endif %endif
%if %{with wheel} %if %{with wheel}
BuildRequires: python3-pip BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python3-wheel BuildRequires: python%{python3_pkgversion}-wheel
%endif %endif
%description %description
python-packaging provides core utilities for Python packages like utilities for python-packaging provides core utilities for Python packages like utilities for
dealing with versions, specifiers, markers etc. dealing with versions, specifiers, markers etc.
%package -n python3-%{pypi_name} %package -n python%{python3_pkgversion}-%{pypi_name}
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
Requires: python3-pyparsing Requires: python%{python3_pkgversion}-pyparsing
Requires: python3-six Requires: python%{python3_pkgversion}-six
%description -n python3-%{pypi_name} %description -n python%{python3_pkgversion}-%{pypi_name}
python3-packaging provides core utilities for Python packages like utilities for python3-packaging provides core utilities for Python packages like utilities for
dealing with versions, specifiers, markers etc. dealing with versions, specifiers, markers etc.
@ -98,7 +98,7 @@ rm -rf html/_static/fonts/
tests/ tests/
%endif %endif
%files -n python3-%{pypi_name} %files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE LICENSE.APACHE LICENSE.BSD %license LICENSE LICENSE.APACHE LICENSE.BSD
%doc README.rst CHANGELOG.rst CONTRIBUTING.rst %doc README.rst CHANGELOG.rst CONTRIBUTING.rst
%{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}/