Skip to content

Commit

Permalink
Add check (and add fallback) for python3 cmd availability on linux de…
Browse files Browse the repository at this point in the history
…pendencies build script
  • Loading branch information
misl6 committed Dec 30, 2024
1 parent fc8ff7c commit bebba2a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/build_linux_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bebba2a

Please sign in to comment.