Have a dynamic Python version by default if possible

This commit is contained in:
Miro Hrončok 2020-04-20 14:52:33 +02:00
commit 6a9ffe6cb2
3 changed files with 14 additions and 4 deletions

View file

@ -1,7 +1,10 @@
#!/bin/sh -eux
# set python version
VERSION=${VERSION:-3.7}
# set default version to %{python3_version} if available
VERSION=${VERSION:-$(rpm --eval '%{?python3_version}')} || true
# ...or 3.8 if that macro is not available or rpm fails for any reason
VERSION=${VERSION:-3.8}
PYTHON=${PYTHON:-python$VERSION}
# what to skip

View file

@ -1,7 +1,10 @@
#!/bin/sh -eux
# set python version
VERSION=${VERSION:-3.7}
# set default version to %{python3_version} if available
VERSION=${VERSION:-$(rpm --eval '%{?python3_version}')} || true
# ...or 3.8 if that macro is not available or rpm fails for any reason
VERSION=${VERSION:-3.8}
PYTHON=${PYTHON:-python$VERSION}
METHOD=${METHOD:-venv}
TOX=${TOX:-true}

View file

@ -13,6 +13,9 @@
tags:
- classic
tests:
- smoke_default:
dir: smoke
run: ./venv.sh
- smoke27:
dir: smoke
run: VERSION=2.7 METHOD=virtualenv ./venv.sh
@ -65,3 +68,4 @@
- python3-tkinter
- python3-test
- python3-debug
- python3-rpm-macros