Use bundled/embedded python3 binary on OSX (#561)
See https://github.com/emscripten-core/emscripten/issues/7198
This commit is contained in:
16
emsdk
16
emsdk
@@ -6,13 +6,13 @@
|
||||
|
||||
# Wrapper script that runs emsdk.py
|
||||
|
||||
base_dir=$(dirname "$0")
|
||||
|
||||
# Look for python3 first. This is especially important on macOS (See:
|
||||
# https://github.com/emscripten-core/emsdk/pull/273)
|
||||
python=$(which python3 2> /dev/null)
|
||||
if [ $? != 0 ]; then
|
||||
python=python
|
||||
if [ -z "$EMSDK_PYTHON" ]; then
|
||||
# Look for python3 first. This is especially important on macOS (See:
|
||||
# https://github.com/emscripten-core/emsdk/pull/273)
|
||||
EMSDK_PYTHON=$(which python3 2> /dev/null)
|
||||
if [ $? != 0 ]; then
|
||||
EMSDK_PYTHON=python
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$python" "$0.py" "$@"
|
||||
exec "$EMSDK_PYTHON" "$0.py" "$@"
|
||||
|
||||
Reference in New Issue
Block a user