From e609c63dff7852d7d34c588976979871138646e0 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 19 Oct 2022 11:11:52 -0700 Subject: [PATCH] Record pip version in our python image builds This is useful for debugging when pip does updates and we need to be sure that we ran with a new (or old) version of pip. Change-Id: I556bb68e255ee0bdbcbd2c72dc537e2a6c7d64b6 --- docker/python-base/Dockerfile | 2 +- docker/python-builder/Dockerfile | 2 +- docker/python-builder/scripts/assemble | 2 ++ docker/python-builder/scripts/install-from-bindep | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/python-base/Dockerfile b/docker/python-base/Dockerfile index f813922297..8f7a2d4678 100644 --- a/docker/python-base/Dockerfile +++ b/docker/python-base/Dockerfile @@ -31,7 +31,7 @@ RUN apt-get update \ # Upgrade pip to fix wheel cache for locally built wheels. # See https://github.com/pypa/pip/issues/6852 -RUN pip install -U pip +RUN pip install -U pip && pip --version # Undo debian changes to openssl.cnf that are too aggressive COPY openssl.cnf /etc/ssl/openssl.cnf diff --git a/docker/python-builder/Dockerfile b/docker/python-builder/Dockerfile index 1cd7e7fa2f..403e2cb3c1 100644 --- a/docker/python-builder/Dockerfile +++ b/docker/python-builder/Dockerfile @@ -45,4 +45,4 @@ RUN dpkg -i /tmp/python3-dev_4.0.0_all.deb \ # Upgrade pip to fix wheel cache for locally built wheels # See https://github.com/pypa/pip/issues/6852 -RUN pip install -U pip +RUN pip install -U pip && pip --version diff --git a/docker/python-builder/scripts/assemble b/docker/python-builder/scripts/assemble index 4d9aa0eb83..fca4943e4f 100755 --- a/docker/python-builder/scripts/assemble +++ b/docker/python-builder/scripts/assemble @@ -91,6 +91,8 @@ done python3 -m venv /tmp/venv /tmp/venv/bin/pip install -U pip wheel build +/tmp/venv/bin/pip --version + # If there is an upper-constraints.txt file in the source tree, # use it in the pip commands. if [ -f /tmp/src/upper-constraints.txt ] ; then diff --git a/docker/python-builder/scripts/install-from-bindep b/docker/python-builder/scripts/install-from-bindep index 916d0735ae..7325b7860c 100755 --- a/docker/python-builder/scripts/install-from-bindep +++ b/docker/python-builder/scripts/install-from-bindep @@ -24,6 +24,8 @@ if [ -f /output/upper-constraints.txt ] ; then CONSTRAINTS="-c /output/upper-constraints.txt" fi +pip --version + # If a requirements.txt file exists, # install it directly so that people can use git url syntax # to do things like pick up patched but unreleased versions