Use constraints with get-pip.py
Presently no constraints are passed to get-pip.py when installing
pip, so we just receive the latest version of pip/setuptools/wheel
everywhere without respecting global-requirement-pins or any other
constraints.
To avoid this we'll pass pip_install_upper_constraints args to
get-pip.py by default.
Change-Id: I32603fd34b60183607c6bd9653c36432cbe6b07a
(cherry picked from commit ff2b9fa21d
)
This commit is contained in:
parent
99181a6354
commit
5d6839449e
|
@ -65,7 +65,12 @@
|
||||||
|
|
||||||
- name: pip cache install files locally
|
- name: pip cache install files locally
|
||||||
local_action: >
|
local_action: >
|
||||||
command python /tmp/get-pip.py -d '{{ pip_tmp_packages | quote }}' {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}
|
command python /tmp/get-pip.py
|
||||||
|
-d '{{ pip_tmp_packages | quote }}'
|
||||||
|
{{ (pip_install_upper_constraints is defined) |
|
||||||
|
ternary('--constraint ' ~ pip_install_upper_constraints, '') }}
|
||||||
|
{{ pip_get_pip_options }}
|
||||||
|
{{ pip_packages | map('quote') | join (' ') }}
|
||||||
changed_when: pip_local_cache.stdout.find('Successfully downloaded') != -1
|
changed_when: pip_local_cache.stdout.find('Successfully downloaded') != -1
|
||||||
register: pip_local_cache
|
register: pip_local_cache
|
||||||
until: pip_local_cache | success
|
until: pip_local_cache | success
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
- block:
|
- block:
|
||||||
- name: Install PIP
|
- name: Install PIP
|
||||||
command: >
|
command: >
|
||||||
python /opt/get-pip.py {{ pip_source_install_options }}
|
python /opt/get-pip.py {{ (pip_install_upper_constraints is defined) |
|
||||||
|
ternary('--constraint ' ~ pip_install_upper_constraints, '') }}
|
||||||
|
{{ pip_source_install_options }}
|
||||||
{{ pip_get_pip_options }}
|
{{ pip_get_pip_options }}
|
||||||
{{ pip_packages | map('quote') | join (' ') }}
|
{{ pip_packages | map('quote') | join (' ') }}
|
||||||
changed_when: pip_install.stdout.find('Successfully installed') != -1
|
changed_when: pip_install.stdout.find('Successfully installed') != -1
|
||||||
|
@ -28,9 +30,12 @@
|
||||||
rescue:
|
rescue:
|
||||||
- name: Install PIP (fall back mode)
|
- name: Install PIP (fall back mode)
|
||||||
command: >
|
command: >
|
||||||
python /opt/get-pip.py --isolated {{ pip_source_install_options }}
|
python /opt/get-pip.py --isolated
|
||||||
{{ pip_get_pip_options }}
|
{{ (pip_install_upper_constraints is defined) |
|
||||||
{{ pip_packages | map('quote') | join (' ') }}
|
ternary('--constraint ' ~ pip_install_upper_constraints, '') }}
|
||||||
|
{{ pip_source_install_options }}
|
||||||
|
{{ pip_get_pip_options }}
|
||||||
|
{{ pip_packages | map('quote') | join (' ') }}
|
||||||
changed_when: pip_install_fall_back.stdout.find('Successfully installed') != -1
|
changed_when: pip_install_fall_back.stdout.find('Successfully installed') != -1
|
||||||
register: pip_install_fall_back
|
register: pip_install_fall_back
|
||||||
until: pip_install_fall_back | success
|
until: pip_install_fall_back | success
|
||||||
|
|
Loading…
Reference in New Issue