Skip to content

Unix entry points: correctly detect the availability of a python binary #15071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions em++
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions em-config
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emar
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions embuilder
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emcc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emcmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emdump
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emdwp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emnm
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emprofile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emranlib
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emrun
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emscons
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions emsize
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tests/runner
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/file_packager
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/run_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/run_python_compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/webidl_binder
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ if [ -z "$PYTHON" ]; then
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
PYTHON=$(command -v python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
PYTHON=$(command -v python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
Expand Down