From 3535675fd4ff3b9b30d1b8980b85e57ad4d07905 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sun, 2 Aug 2026 03:03:36 +0000 Subject: [PATCH] fix(whisper-medusa): pin available portable Python The standalone Python release used by libbackend does not publish a 3.11.18 artifact. Pin Whisper-Medusa to the available 3.11.13 build and cover the generated download URL. Assisted-by: Codex:gpt-5 [systematic-debugging] Signed-off-by: Ettore Di Giacinto --- backend/python/whisper-medusa/install.sh | 1 + backend/python/whisper-medusa/test.sh | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/backend/python/whisper-medusa/install.sh b/backend/python/whisper-medusa/install.sh index 6e01998bc..e455c67fe 100755 --- a/backend/python/whisper-medusa/install.sh +++ b/backend/python/whisper-medusa/install.sh @@ -9,4 +9,5 @@ else fi PYTHON_VERSION="3.11" +PYTHON_PATCH="13" installRequirements diff --git a/backend/python/whisper-medusa/test.sh b/backend/python/whisper-medusa/test.sh index 2290a3dc0..d942f2d41 100755 --- a/backend/python/whisper-medusa/test.sh +++ b/backend/python/whisper-medusa/test.sh @@ -1,3 +1,26 @@ #!/bin/bash set -e python3 -m unittest test_unit.py + +tmp_dir=$(mktemp -d) +trap 'rm -rf "$tmp_dir"' EXIT +mkdir -p "$tmp_dir/bin" +cat >"$tmp_dir/bin/curl" <<'EOF' +#!/bin/bash +printf '%s\n' "${@: -1}" >"$PORTABLE_PY_URL_CAPTURE" +exit 22 +EOF +chmod +x "$tmp_dir/bin/curl" + +PORTABLE_PY_URL_CAPTURE="$tmp_dir/url" \ + ENV_DIR="$tmp_dir/backend" \ + PORTABLE_PYTHON=true \ + PATH="$tmp_dir/bin:$PATH" \ + bash install.sh >/dev/null 2>&1 || true + +expected_url="https://github.com/astral-sh/python-build-standalone/releases/download/20250818/cpython-3.11.13+20250818-x86_64-unknown-linux-gnu-install_only.tar.gz" +actual_url=$(cat "$tmp_dir/url") +if [ "$actual_url" != "$expected_url" ]; then + echo "unexpected portable Python URL: $actual_url" >&2 + exit 1 +fi