diff --git a/packaging/rpm/python3-wheel.spec b/packaging/rpm/python3-wheel.spec index a7fa0fc617..74ac8c1f5d 100644 --- a/packaging/rpm/python3-wheel.spec +++ b/packaging/rpm/python3-wheel.spec @@ -12,12 +12,19 @@ exit %define python3_sitelib %(%{python3} -Ic "from sysconfig import get_path; print(get_path('purelib').replace('/usr/local/', '/usr/'))" 2> /dev/null) %endif %define python3_version %(%{python3} -c 'import sys;vi=sys.version_info;print(f"{vi[0]}.{vi[1]}")') +%define python3_minor %(%{python3} -c 'import sys;vi=sys.version_info;print(f"{vi[1]}")') +%echo OOOO %{python3_minor} %global pypi_name wheel Name: %{python3}-%{pypi_name} -Version: 0.41.3 Release: 2%{?dist} +%if 0%{python3_minor} < 7 +Version: 0.33.6 +Source0: https://files.pythonhosted.org/packages/59/b0/11710a598e1e148fb7cbf9220fd2a0b82c98e94efbdecb299cb25e7f0b39/%{pypi_name}-%{version}.tar.gz +%else +Version: 0.41.3 Source0: https://files.pythonhosted.org/packages/fb/d0/0b4c18a0b85c20233b0c3bc33f792aefd7f12a5832b4da77419949ff6fd9/%{pypi_name}-%{version}.tar.gz +%endif Summary: Built-package format for Python Provides: bundled(python3dist(packaging)) = 20.9 BuildRequires: %{python3}-devel @@ -40,7 +47,11 @@ It has two different roles: %prep sha256=`sha256sum %{SOURCE0} | awk '{print $1}'` +%if 0%{python3_minor} < 7 +if [ "${sha256}" != "10c9da68765315ed98850f8e048347c3eb06dd81822dc2ab1d4fde9dc9702646" ]; then +%else if [ "${sha256}" != "4d4987ce51a49370ea65c0bfd2234e8ce80a12780820d9dc462597a6e60d0841" ]; then +%endif echo "invalid checksum for %{SOURCE0}" exit 1 fi