]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Don't use pip3 to install Python packages anymore
authorTobias Brunner <tobias@strongswan.org>
Thu, 27 Feb 2025 14:50:02 +0000 (15:50 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Feb 2025 11:55:12 +0000 (12:55 +0100)
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
scripts/test.sh

index e1a72318e2832898a9e745f34a871d96f0130a43..3fefe7640ef8a4c883a221a36a869344edacb818 100644 (file)
@@ -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
index f8e191fbd1862b77736b7c1c1610a4b80e274110..35f22ff3d743989d3000df7d66047fbc1ef87928 100755 (executable)
@@ -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
        ;;