From f740faccac16835ba0da126309e82ff4e65f05e9 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 27 Feb 2025 15:50:02 +0100 Subject: [PATCH] github: Don't use pip3 to install Python packages anymore Currently, the runner images enable break-system-packages globally. However, this workaround will be removed by the end of March. So we switch to installing these packages as intended via distro (the alternative would be to use pipx, at least for tox). --- .github/actions/default/action.yml | 3 --- scripts/test.sh | 15 ++++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/actions/default/action.yml b/.github/actions/default/action.yml index e1a72318e2..3fefe7640e 100644 --- a/.github/actions/default/action.yml +++ b/.github/actions/default/action.yml @@ -5,9 +5,6 @@ runs: - name: "Install Dependencies" run: ./scripts/test.sh deps shell: bash - - name: "Install Python Dependencies" - run: ./scripts/test.sh pydeps - shell: bash - name: "Build Dependencies" run: ./scripts/test.sh build-deps shell: bash diff --git a/scripts/test.sh b/scripts/test.sh index f8e191fbd1..35f22ff3d7 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -306,8 +306,14 @@ all|alpine|codeql|coverage|sonarcloud|no-dbg) DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev libldap2-dev libpcsclite-dev libpam0g-dev binutils-dev libnm-dev - libgcrypt20-dev libjson-c-dev python3-pip libtspi-dev libsystemd-dev - libselinux1-dev libiptc-dev" + libgcrypt20-dev libjson-c-dev libtspi-dev libsystemd-dev + libselinux1-dev libiptc-dev python3-build tox" + if [ "$ID" = "ubuntu" -a "$VERSION_ID" = "22.04" -a "$1" = "build-deps" ]; then + # python3-build is broken on 22.04 with venv (https://bugs.launchpad.net/ubuntu/+source/python-build/+bug/1992108) + # while installing python3-virtualenv should help, it doesn't. as even + # after uninstalling python3-venv, build prefers the latter + sudo python3 -m pip install --upgrade build + fi if [ "$TEST" = "alpine" ]; then # override the whole list for alpine DEPS="git gmp-dev openldap-dev curl-dev ldns-dev unbound-dev libsoup-dev @@ -324,7 +330,6 @@ all|alpine|codeql|coverage|sonarcloud|no-dbg) # and no Clearsilver CONFIG="$CONFIG --disable-fast --disable-manager --disable-medsrv" fi - PYDEPS="build tox" if test "$1" = "build-deps"; then build_botan build_wolfssl @@ -491,10 +496,6 @@ deps) esac exit $? ;; -pydeps) - test -z "$PYDEPS" || pip3 -q install --user $PYDEPS - exit $? - ;; build-deps) exit ;;