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>
This commit is contained in:
Alessandro Gatti
2025-03-07 00:07:11 +01:00
committed by Damien George
parent 1a7cbac879
commit 31a008c6e2

View File

@@ -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