From ef83ff13fed6c4fb99a3f0445314fa08fa6fd932 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 8 Mar 2019 12:03:15 +0100 Subject: Introduce 'get_pip' macro We have code for it in four places so it is a good candidate for macro. Change-Id: Icadcbbe5b386bdf688fd67e8160b40974f047377 --- docker/macros.j2 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docker/macros.j2') diff --git a/docker/macros.j2 b/docker/macros.j2 index 5386dca75..aee933e7b 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -21,6 +21,12 @@ {% endif %} {%- endmacro %} +{% macro get_pip() %} +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ + && python get-pip.py \ + && rm get-pip.py +{% endmacro %} + {% macro install_pip(packages, constraints = true, pip_version = pip) %} {%- if packages is sequence and packages|length > 0 -%} {%- if not pip_version -%} -- cgit v1.2.3