]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Fix python build and checks on older Ubuntu releases
authorTobias Brunner <tobias@strongswan.org>
Wed, 5 May 2021 16:46:49 +0000 (18:46 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 6 May 2021 13:16:42 +0000 (15:16 +0200)
On 18.04, setuptools was apparently pulled in by python-pip but is not
by python3-pip and on Ubuntu 16.04 there is an issue with tox when
installed via pip3 (syntax error in one of the dependencies) and with
pip that dependency is not even available.

scripts/test.sh

index 2028db33db15872ab57fc9abd8b34628f8d427cc..bd155b043afe503f87ffa449f5d46ac5665f12c1 100755 (executable)
@@ -178,9 +178,12 @@ all|coverage|sonarcloud)
        if [ "$ID" = "ubuntu" -a "$VERSION_ID" = "20.04" ]; then
                DEPS="$DEPS libiptc-dev"
        else
-               DEPS="$DEPS iptables-dev"
+               DEPS="$DEPS iptables-dev python3-setuptools"
+       fi
+       # tox has dependencies that can't be resolved on 16.04 (even with pip)
+       if [ "$ID" != "ubuntu" -o "$VERSION_ID" != "16.04" ]; then
+               PYDEPS="tox"
        fi
-       PYDEPS="tox"
        if test "$1" = "build-deps"; then
                if [ "$ID" != "ubuntu" -o "$VERSION_ID" != "16.04" ]; then
                        build_botan