Default to running tests with Python 3

Specify PY2=1 to use Python 2.

See #1779
Closes #2235
This commit is contained in:
Olly Betts 2022-03-17 15:30:21 +13:00
commit c7af8eabb3
14 changed files with 39 additions and 36 deletions

View file

@ -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")