From 6fe38aa97121b78f4f99e2c391bf96fde29db221 Mon Sep 17 00:00:00 2001 From: tedvask Date: Fri, 3 Jul 2026 16:39:30 +0300 Subject: [PATCH] Accept Python 3.14+ in venv provisioning (use a >=3.9 floor) --- packaging/postinstall.sh | 10 +++++----- packaging/voxd.wrapper | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packaging/postinstall.sh b/packaging/postinstall.sh index 636200d6..7e5e577e 100644 --- a/packaging/postinstall.sh +++ b/packaging/postinstall.sh @@ -43,17 +43,17 @@ APPDIR="/opt/voxd" # Pick a Python >= 3.9 if available; attempt RPM install on openSUSE if too old pick_python() { - for c in python3.12 python3.11 python3.10 python3.9 python3 python; do + for c in python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 python3 python; do if command -v "$c" >/dev/null 2>&1; then ver="$("$c" - <<'PY' import sys print(f"{sys.version_info.major}.{sys.version_info.minor}") PY )" - case "$ver" in - 3.9|3.10|3.11|3.12|3.13) echo "$c"; return 0 ;; - *) ;; - esac + maj="${ver%%.*}"; min="${ver#*.}" + if [ "$maj" -gt 3 ] || { [ "$maj" -eq 3 ] && [ "$min" -ge 9 ]; }; then + echo "$c"; return 0 + fi fi done echo "" diff --git a/packaging/voxd.wrapper b/packaging/voxd.wrapper index d1b0e111..5a6a1941 100644 --- a/packaging/voxd.wrapper +++ b/packaging/voxd.wrapper @@ -49,17 +49,17 @@ PY *) # Attempt to create a user-local venv with any newer Python found pick_python() { - for c in python3.12 python3.11 python3.10 python3.9 python3; do + for c in python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 python3; do if command -v "$c" >/dev/null 2>&1; then v="$($c - <<'PY' import sys print(f"{sys.version_info.major}.{sys.version_info.minor}") PY )" - case "$v" in - 3.9|3.10|3.11|3.12|3.13) echo "$c"; return 0 ;; - *) : ;; - esac + maj="${v%%.*}"; min="${v#*.}" + if [ "$maj" -gt 3 ] || { [ "$maj" -eq 3 ] && [ "$min" -ge 9 ]; }; then + echo "$c"; return 0 + fi fi done echo ""