feat: show supported versions for setup.sh script

as proposed in #12812
This commit is contained in:
Matthias
2026-02-10 19:32:02 +01:00
parent c7685febcf
commit c02530759d

View File

@@ -7,6 +7,9 @@ function echo_block() {
echo "----------------------------" echo "----------------------------"
} }
UV=false UV=false
# Supported Python minor versions (order matters for detection)
SUPPORTED_MINOR_VERS=(13 12 11)
SUPPORTED_PY_VERSIONS="3.11, 3.12 and 3.13"
function check_installed_pip() { function check_installed_pip() {
${PYTHON} -m pip > /dev/null ${PYTHON} -m pip > /dev/null
@@ -33,7 +36,7 @@ function check_installed_python() {
return return
fi fi
for v in 13 12 11 for v in "${SUPPORTED_MINOR_VERS[@]}"
do do
PYTHON="python3.${v}" PYTHON="python3.${v}"
which $PYTHON which $PYTHON
@@ -45,7 +48,7 @@ function check_installed_python() {
fi fi
done done
echo "No usable python found. Please make sure to have python3.11 or newer installed." echo "No usable python found. Supported versions are: ${SUPPORTED_PY_VERSIONS}. Please install one of these."
exit 1 exit 1
} }