From bebba2a6238bb834cba3e36a7f2f576f33c79b94 Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Mon, 30 Dec 2024 19:12:59 +0100 Subject: [PATCH] Add check (and add fallback) for python3 cmd availability on linux dependencies build script --- tools/build_linux_dependencies.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/build_linux_dependencies.sh b/tools/build_linux_dependencies.sh index 29534b28bf..41388248cf 100755 --- a/tools/build_linux_dependencies.sh +++ b/tools/build_linux_dependencies.sh @@ -61,7 +61,14 @@ mkdir kivy-dependencies/dist # Build the dependencies pushd kivy-dependencies/build -IS_RPI=$(python3 -c "import platform; print('1' if 'raspberrypi' in platform.uname() else '0')") +# Check if "python3" exists, otherwise use "python" as fallback (which is the case for manylinux) +if command -v python3 &> /dev/null; then + PYTHON_EXECUTABLE=python3 +else + PYTHON_EXECUTABLE=python +fi + +IS_RPI=$(PYTHON_EXECUTABLE -c "import platform; print('1' if 'raspberrypi' in platform.uname() else '0')") if [ "$(dpkg --print-architecture)" = "armhf" ]; then IS_ARMHF=1 else