Pin get-pip.py to 3.2

As get-pip.py evolves based on pip 10, while we're still using
pip 9, changes in the way it can be used are causing problems.

For example, the ability to use --download is no longer there.

As such, let's pin to a known good version and leave it at that
until we no longer need to use this script. Version 3.2 maps to
pip 7.1.2 which fulfills our needs.

Change-Id: I2a49a407e82c23540cd0aff209bd276c8a303bf0
Closes-Bug: 1779534
(cherry picked from commit e79314ecd4)
This commit is contained in:
Jesse Pretorius 2018-07-03 18:10:15 +01:00
parent 18ef79ccbf
commit a4fa7aee43
3 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ pip_install_upper_constraints: "{{ repo_release_path }}/requirements_absolute_re
pip_offline_install: false
# The URL to retrieve the get-pip.py installation script
pip_upstream_url: "{{ (pip_offline_install | bool) | ternary('https://bootstrap.pypa.io/get-pip.py', repo_release_path ~ '/get-pip.py') }}"
pip_upstream_url: "{{ (pip_offline_install | bool) | ternary('https://bootstrap.pypa.io/3.2/get-pip.py', repo_release_path ~ '/get-pip.py') }}"
# The URL to the repo server's pypi reverse proxy simple index
pip_default_index: "{{ openstack_repo_url }}/simple"

View File

@ -24,7 +24,7 @@
timeout: 3
register: _repo_data_check
failed_when: false
when: pip_upstream_url != "https://bootstrap.pypa.io/get-pip.py"
when: pip_upstream_url != "https://bootstrap.pypa.io/3.2/get-pip.py"
tags:
- common-pip
@ -32,9 +32,9 @@
# pip isn't locked to it.
- name: Set pip upstream URL
set_fact:
pip_upstream_url: "https://bootstrap.pypa.io/get-pip.py"
pip_upstream_url: "https://bootstrap.pypa.io/3.2/get-pip.py"
when:
- pip_upstream_url != "https://bootstrap.pypa.io/get-pip.py"
- pip_upstream_url != "https://bootstrap.pypa.io/3.2/get-pip.py"
- (_repo_data_check.status | default(503)) != 200
tags:
- common-pip

View File

@ -337,8 +337,8 @@ function get_pip {
${GETPIP_CMD} ${GET_PIP_URL} > ${GETPIP_FILE}
else
# Otherwise, try the two standard URL's
${GETPIP_CMD} https://bootstrap.pypa.io/get-pip.py > ${GETPIP_FILE}\
|| ${GETPIP_CMD} https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.py > ${GETPIP_FILE}
${GETPIP_CMD} https://bootstrap.pypa.io/3.2/get-pip.py > ${GETPIP_FILE}\
|| ${GETPIP_CMD} https://raw.githubusercontent.com/pypa/get-pip/master/3.2/get-pip.py > ${GETPIP_FILE}
fi
${GETPIP_PYTHON_EXEC_PATH} ${GETPIP_FILE} \