Patch new pip to make it support the old private API of main()

This is needed to be able to use pip 19.3+ in ensurepip of older Pythons
without patching all the Pythons.
This commit is contained in:
Miro Hrončok 2019-12-11 16:10:22 +01:00
commit af087f8054
2 changed files with 38 additions and 0 deletions

View file

@ -97,6 +97,15 @@ Patch4: dummy-certifi.patch
Patch5: network-tests.patch
%endif
# Dark magic to make pip 19.3+ support the old private API of main()
# This is needed to be able to use pip 19.3+ in ensurepip of older Pythons
# without patching all the Pythons
# A proper fix is discussed in:
# https://discuss.python.org/t/can-we-finally-add-a-minimal-api-to-pip/2833/3
# https://github.com/pypa/pip/pull/7061
# https://github.com/python/cpython/pull/16782
Patch6: callable-main.patch
# Downstream only patch
# Users might have local installations of pip from using
# `pip install --user --upgrade pip` on older/newer versions.
@ -254,6 +263,7 @@ popd
%if %{with tests}
%patch5 -p1
%endif
%patch6 -p1
# this goes together with patch4
rm src/pip/_vendor/certifi/*.pem