diff options
author | Olly Betts <olly@survex.com> | 2022-03-17 15:30:21 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-03-17 18:55:10 +1300 |
commit | c7af8eabb3334063c9cede2916b14f23920082d7 (patch) | |
tree | 1f4beaf3a603e3a9e601108ddf6bbfb76d8ed575 /Tools | |
parent | 2da3815f998a3488995fec5d1a7583da395ac2fa (diff) | |
download | swig-c7af8eabb3334063c9cede2916b14f23920082d7.tar.gz |
Default to running tests with Python 3
Specify PY2=1 to use Python 2.
See #1779
Closes #2235
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CI-linux-install.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Tools/CI-linux-install.sh b/Tools/CI-linux-install.sh index 4dad7ba29..b88df193c 100644 --- a/Tools/CI-linux-install.sh +++ b/Tools/CI-linux-install.sh @@ -98,14 +98,20 @@ case "$SWIGLANG" in ;; "python") pip install --user pycodestyle + if [[ "$PY2" ]]; then + WITHLANG=$SWIGLANG + else + WITHLANG=${SWIGLANG}3 + fi if [[ "$VER" ]]; then $RETRY sudo add-apt-repository -y ppa:deadsnakes/ppa $RETRY sudo apt-get -qq update $RETRY sudo apt-get -qq install python${VER}-dev - WITHLANG=$SWIGLANG$PY3=$SWIGLANG$VER + WITHLANG=$WITHLANG=$SWIGLANG$VER + elif [[ "$PY2" ]]; then + $RETRY sudo apt-get install -qq python-dev else - $RETRY sudo apt-get install -qq python${PY3}-dev - WITHLANG=$SWIGLANG$PY3 + $RETRY sudo apt-get install -qq python3-dev fi ;; "r") |