summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-03-07 00:07:11 +0100
committerDamien George <damien@micropython.org>2025-03-17 13:04:53 +1100
commit31a008c6e26eccc3798a9ab4169019a02eadb830 (patch)
tree658a02c33df48c6f8221bc19154f8f2448e9323a
parent1a7cbac879fa578cd992a3baf10950180e89340d (diff)
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 <a.gatti@frob.it>
-rwxr-xr-xtools/ci.sh3
1 files changed, 2 insertions, 1 deletions
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