From 31a008c6e26eccc3798a9ab4169019a02eadb830 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Fri, 7 Mar 2025 00:07:11 +0100 Subject: [PATCH] tools/ci.sh: Do not assume the Python interpreter is called "python". This commit removes the assumption made by the CI scripts that the system-provided python executable is simply named "python". The scripts will now look for a binary called "python3" first, and then fall back to "python" if that is not found. Whilst this is currently the case for the CI environment, there are no guarantees for this going forward. For example minimal CI environments set up by some developers, using the same base OS, have their python executable called "python3". Signed-off-by: Alessandro Gatti --- tools/ci.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci.sh b/tools/ci.sh index 7105b2460..c7a6db79d 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -150,7 +150,8 @@ function ci_cc3200_build { # GitHub tag of ESP-IDF to use for CI (note: must be a tag or a branch) IDF_VER=v5.2.2 -PYTHON_VER=$(python --version | cut -d' ' -f2) +PYTHON=$(command -v python3 2> /dev/null) +PYTHON_VER=$(${PYTHON:-python} --version | cut -d' ' -f2) export IDF_CCACHE_ENABLE=1