diff options
| author | Zuul <zuul@review.opendev.org> | 2020-09-21 09:31:35 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-09-21 09:31:35 +0000 |
| commit | e068a3fb3d9fae2db60e59d6475aa6e897cad651 (patch) | |
| tree | 3b37b3c6d486162bc135ef0e203528eb63cf49bb /docker/macros.j2 | |
| parent | 16b5d4197f68b7564bcd2853fa16a618c493b87f (diff) | |
| parent | b93c40a3635fbce72e48dc29120e50484cba36ca (diff) | |
| download | kolla-e068a3fb3d9fae2db60e59d6475aa6e897cad651.tar.gz kolla-e068a3fb3d9fae2db60e59d6475aa6e897cad651.zip | |
Merge "Improve pip install process for offline deployment."
Diffstat (limited to 'docker/macros.j2')
| -rw-r--r-- | docker/macros.j2 | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2 index efeac9b81..56dd1414a 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -32,18 +32,9 @@ {% endif %} {%- endmacro %} -{% macro get_pip() %} -RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && python3 get-pip.py \ - && rm get-pip.py -{% endmacro %} - -{% macro install_pip(packages, constraints = true, pip_version = pip) %} +{% macro install_pip(packages, constraints = true) %} {%- if packages is sequence and packages|length > 0 -%} -{%- if not pip_version -%} - {%- set pip_version = 'pip' -%} -{%- endif -%} - {{ pip_version }} --no-cache-dir install --upgrade{{ ' ' }} + python{{ distro_python_version }} -m pip --no-cache-dir install --upgrade{{ ' ' }} {%- if constraints %}-c /requirements/upper-constraints.txt {% endif -%} {{ packages | join(' ') }} {%- else -%} |
