diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-02-20 18:22:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-02-20 18:22:41 +0000 |
| commit | 213a585ee62fa0d349775303419775bc02eb34d9 (patch) | |
| tree | 71f70b10d28ea378cee5bed65ef447c1e5a35f18 /docker/macros.j2 | |
| parent | b39a80db9caea1f65bf1b69ebc68d7188410df66 (diff) | |
| parent | 961224c6cf5ac24fc49fc52ab3c51a87348ee35d (diff) | |
| download | kolla-213a585ee62fa0d349775303419775bc02eb34d9.tar.gz kolla-213a585ee62fa0d349775303419775bc02eb34d9.zip | |
Merge "Use install-pip macro in most source images"
Diffstat (limited to 'docker/macros.j2')
| -rw-r--r-- | docker/macros.j2 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2 index b60b6eb97..143d15bcc 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -14,8 +14,14 @@ {%- endmacro %} -{% macro install_pip(packages) %} -RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt {% for package in packages %}{{ package }} {% endfor %} +{% macro install_pip(packages, constraints = true) %} +{%- if packages is sequence and packages|length > 0 -%} + pip --no-cache-dir install --upgrade{{ ' ' }} + {%- if constraints %}-c requirements/upper-constraints.txt {% endif -%} + {{ packages | join(' ') }} +{%- else -%} + true +{%- endif -%} {% endmacro %} |
