From 6a9ffe6cb20d6253088f0f046a93ea0522b6f6f8 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Apr 20 2020 13:32:38 +0000 Subject: Have a dynamic Python version by default if possible --- diff --git a/selftest/parallel.sh b/selftest/parallel.sh index 740607c..49ec458 100755 --- a/selftest/parallel.sh +++ b/selftest/parallel.sh @@ -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 diff --git a/smoke/venv.sh b/smoke/venv.sh index 725c948..f127e4a 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -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} diff --git a/tests.yml b/tests.yml index 79a2b24..d9c3c04 100644 --- a/tests.yml +++ b/tests.yml @@ -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