Update python detection

This commit is contained in:
klzgrad 2024-05-04 23:51:22 +08:00
parent b639b6b61e
commit 9ce5b852b8
2 changed files with 6 additions and 2 deletions

View File

@ -115,6 +115,6 @@ mkdir -p out
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
./gn/out/gn gen "$out" --args="$flags $EXTRA_FLAGS" --script-executable=$PYTHON
./gn/out/gn gen "$out" --args="$flags $EXTRA_FLAGS"
ninja -C "$out" naive

View File

@ -24,7 +24,11 @@ if [ ! "$target_cpu" ]; then
target_cpu="$host_cpu"
fi
PYTHON=$(which python3 2>/dev/null || which python 2>/dev/null)
if which python3 2>/dev/null; then
PYTHON=python3
else
PYTHON=python
fi
# sysroot
case "$target_os" in