From 6fef7b6ab68c7d9046d4e17289d7be760926f022 Mon Sep 17 00:00:00 2001 From: Felix Reissmann Date: Thu, 14 Nov 2024 20:43:01 +0100 Subject: [PATCH] Add fix for distros without python3.13. --- .github/workflows/build-ci.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-ci.sh b/.github/workflows/build-ci.sh index 260d3ba..cb85c67 100755 --- a/.github/workflows/build-ci.sh +++ b/.github/workflows/build-ci.sh @@ -125,10 +125,16 @@ if echo "$@" | grep -q -- "-enable-roc"; then fi if [[ $setup_python_venv -eq 1 ]]; then + # NOTE: This is a temporary workaround as some distros ship python3.13 which does not yet provide a torch package + supported_python_executable=python3 + if command -v python3.12 &> /dev/null; then + supported_python_executable=python3.12 + fi + reconfigure_python_venv=0 if [ ! -d "$py_venv_path" ]; then status "Creating Python venv" - python3.12 -m venv "$py_venv_path" + $supported_python_executable -m venv "$py_venv_path" source "$py_venv_path/bin/activate" reconfigure_python_venv=1 else