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