From 666980dc1ca66660cc8734ae6757a90fd5240cb3 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 23 Jan 2022 18:39:51 +0100 Subject: [PATCH] Update pip to use Python3 for PHP >= 7.3 --- Dockerfiles/work/Dockerfile-7.3 | 5 +- Dockerfiles/work/Dockerfile-7.4 | 5 +- Dockerfiles/work/Dockerfile-8.0 | 5 +- Dockerfiles/work/Dockerfile-8.1 | 5 +- build/ansible/group_vars/all/work.yml | 75 ++++++++++++++++++++++++++- 5 files changed, 86 insertions(+), 9 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 2de32e0..629ef69 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -158,11 +158,12 @@ RUN set -eux \ # -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - libpython-dev \ + libpython3-dev \ + python3-distutils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && rm -rf /var/lib/apt/lists/* \ \ -&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ +&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \ \ \ # -------------------- nvm -------------------- diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 1596856..0ec547f 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -158,11 +158,12 @@ RUN set -eux \ # -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - libpython-dev \ + libpython3-dev \ + python3-distutils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && rm -rf /var/lib/apt/lists/* \ \ -&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ +&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \ \ \ # -------------------- nvm -------------------- diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 9abea14..af20a9d 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -158,11 +158,12 @@ RUN set -eux \ # -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - libpython-dev \ + libpython3-dev \ + python3-distutils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && rm -rf /var/lib/apt/lists/* \ \ -&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ +&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \ \ \ # -------------------- nvm -------------------- diff --git a/Dockerfiles/work/Dockerfile-8.1 b/Dockerfiles/work/Dockerfile-8.1 index 454f9fe..cb927f5 100644 --- a/Dockerfiles/work/Dockerfile-8.1 +++ b/Dockerfiles/work/Dockerfile-8.1 @@ -158,11 +158,12 @@ RUN set -eux \ # -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - libpython-dev \ + libpython3-dev \ + python3-distutils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && rm -rf /var/lib/apt/lists/* \ \ -&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ +&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \ \ \ # -------------------- nvm -------------------- diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index 83dd5ca..2fb819a 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -422,7 +422,7 @@ software_available: && ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \ # pip is a dependency for others pip: - all: + 5.2: command: | DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -431,6 +431,79 @@ software_available: && rm -rf /var/lib/apt/lists/* \ \ && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 5.3: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 5.4: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 5.5: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 5.6: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 7.0: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 7.1: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + 7.2: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \ + all: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython3-dev \ + python3-distutils \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \ # nvm is a dependency for others nvm: check: su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+'