From b5015c85feef045e255c6fb5227557df3048c01f Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jul 07 2020 10:06:21 +0000 Subject: Define pip/setuptools versions in once place, provide bundled(python3dist(...)) This makes once obvious place where the versions need to be updated. The twice listed versions were easy to miss. --- diff --git a/python3.7.spec b/python3.7.spec index bcfcd61..9ff2b56 100644 --- a/python3.7.spec +++ b/python3.7.spec @@ -256,6 +256,12 @@ Patch170: 00170-gc-assertions.patch # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels Patch189: 00189-use-rpm-wheels.patch +# The following versions of setuptools/pip are bundled when this patch is not applied. +# The versions are written in Lib/ensurepip/__init__.py, this patch removes them. +# When the bundled setuptools/pip wheel is updated, the patch no longer applies cleanly. +# In such cases, the patch needs to be amended and the versions updated here: +%global pip_version 20.1.1 +%global setuptools_version 47.1.0 # 00251 # Set values of prefix and exec_prefix in distutils install command @@ -386,8 +392,8 @@ Summary: Python runtime libraries Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 20.1.1 -Provides: bundled(python3-setuptools) = 47.1.0 +Provides: bundled(python3dist(pip)) = %{pip_version} +Provides: bundled(python3dist(setuptools)) = %{setuptools_version} %endif %{?python_provide:%python_provide python3-libs} @@ -563,8 +569,8 @@ so extensions for both versions can co-exist in the same directory. Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 19.2.3 -Provides: bundled(python3-setuptools) = 41.2.0 +Provides: bundled(python3dist(pip)) = %{pip_version} +Provides: bundled(python3dist(setuptools)) = %{setuptools_version} %endif # The description for the flat package