Merge "Install last stable version of get-pip.py script"

This commit is contained in:
Zuul 2021-02-03 01:16:13 +00:00 committed by Gerrit Code Review
commit 6cfc94c8bf
2 changed files with 15 additions and 1 deletions

View File

@ -122,7 +122,10 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
fi
# install the latest python2 pip; this overwrites packaged pip
# NOTE(dpawlik) The get-pip.py script is not base on master release.
# Ensure that is uses latest available version.
python /tmp/get-pip.py ${pip_args}
python -m pip install ${pip_args} pip
# Install latest setuptools; there is a slight chicken-egg issue in
# that pip requires setuptools for some operations like building a
@ -141,7 +144,10 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then
# python2 would work -- alas get-pip.py doesn't seem to leave
# python3 alone:
# https://github.com/pypa/pip/issues/4435
# NOTE(dpawlik) The get-pip.py script is not base on master release.
# Ensure that is uses latest available version.
python3 /tmp/get-pip.py ${pip_args}
python3 -m pip install ${pip_args} pip
pip3 install ${pip_args} setuptools
# on < 27, this installed pip3 to /usr/bin/pip. On >=27 it's
@ -250,6 +256,11 @@ else
python3 /tmp/get-pip.py $pip_args
python2 /tmp/get-pip.py $pip_args
# NOTE(dpawlik) The get-pip.py script is not base on master release.
# Ensure that is uses latest available version.
python3 -m pip install $pip_args pip
python2 -m pip install $pip_args pip
pip3 install $pip_args virtualenv
pip install $pip_args virtualenv
fi

View File

@ -1 +1,4 @@
pip-and-virtualenv file /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
# NOTE(dpawlik) We set get-pip.py script to use 3.5 version, that is compatible
# with python2.7 and newer. It should be removed in the future, when Python 2
# is dropped.
pip-and-virtualenv file /tmp/get-pip.py https://bootstrap.pypa.io/3.5/get-pip.py