From 00d29d829bb39c034531aba4513b1d9639d300ed Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 20 Oct 2021 09:18:49 +1100 Subject: [PATCH] infra-package-needs: install latest pip The pip installed in the venv with "python3 -m venv" on Xenial is 8.X -- this does not understand python_requires metadata on packages and can thus pull in requirements that won't actually run inside the virtualenv. Avoid this by upgrading pip in the venv before installing. While this is the immediate need; do the same on the other venv's we create for general sanity. Change-Id: I316e9587b6e290cd421b47f506c91dbebe0975c0 --- .../infra-package-needs/install.d/40-install-bindep | 7 +++++++ .../elements/infra-package-needs/install.d/40-install-tox | 7 +++++++ nodepool/elements/nodepool-base/install.d/91-venv-os-testr | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/nodepool/elements/infra-package-needs/install.d/40-install-bindep b/nodepool/elements/infra-package-needs/install.d/40-install-bindep index 67a86dc2d9..3cea319672 100755 --- a/nodepool/elements/infra-package-needs/install.d/40-install-bindep +++ b/nodepool/elements/infra-package-needs/install.d/40-install-bindep @@ -23,4 +23,11 @@ fi set -e python3 -m venv /usr/bindep-env +if [[ ${DIB_RELEASE} == 'xenial' ]]; then + # The pip on xenial can't figure out it shouldn't install + # the latest pip; this is the last to support 3.5 + /usr/bindep-env/bin/pip install --upgrade pip==20.3.4 +else + /usr/bindep-env/bin/pip install --upgrade pip +fi /usr/bindep-env/bin/pip install bindep diff --git a/nodepool/elements/infra-package-needs/install.d/40-install-tox b/nodepool/elements/infra-package-needs/install.d/40-install-tox index d5c3b09d92..e34e7b0d75 100755 --- a/nodepool/elements/infra-package-needs/install.d/40-install-tox +++ b/nodepool/elements/infra-package-needs/install.d/40-install-tox @@ -23,4 +23,11 @@ fi set -e python3 -m venv /usr/tox-env +if [[ ${DIB_RELEASE} == 'xenial' ]]; then + # The pip on xenial can't figure out it shouldn't install + # the latest pip; this is the last to support 3.5 + /usr/bindep-env/bin/pip install --upgrade pip==20.3.4 +else + /usr/bindep-env/bin/pip install --upgrade pip +fi /usr/tox-env/bin/pip install tox diff --git a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr index ea96003c98..efecd2703b 100755 --- a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr +++ b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr @@ -19,4 +19,11 @@ fi set -e python3 -m venv /usr/os-testr-env +if [[ ${DIB_RELEASE} == 'xenial' ]]; then + # The pip on xenial can't figure out it shouldn't install + # the latest pip; this is the last to support 3.5 + /usr/bindep-env/bin/pip install --upgrade pip==20.3.4 +else + /usr/bindep-env/bin/pip install --upgrade pip +fi /usr/os-testr-env/bin/pip install os-testr