e062c54f4 Add bazel feature for wasm-exceptions (#1575) d49219d03 Release 4.0.11 (#1572) d845e506c Fix python search path in emsdk launcher scripts (#1571) 62a853cd3 Release 4.0.10 (#1565) 2d480a1b7 Update Node.js to LTS 22.16.0. (#1563) cfe7ccf16 Update python version note for Linux. (#1562) d07c79341 Update Python to 3.13.3 and add support to Windows on ARM64. (#1477) git-subtree-dir: libs/emsdk git-subtree-split: e062c54f436e58ee102d2d37901cdaa052af249a
40 lines
1.2 KiB
Bash
Executable File
40 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# Copyright 2019 The Emscripten Authors. All rights reserved.
|
|
# Emscripten is available under two separate licenses, the MIT license and the
|
|
# University of Illinois/NCSA Open Source License. Both these licenses can be
|
|
# found in the LICENSE file.
|
|
|
|
# Wrapper script that runs emsdk.py
|
|
|
|
# First look for python bundled in Emsdk
|
|
if [ -z "$EMSDK_PYTHON" ]; then
|
|
PYTHON3="$(dirname "$0")/python/3.13.3_64bit/bin/python3"
|
|
if [ ! -f "$PYTHON3" ]; then
|
|
PYTHON3="$(dirname "$0")/python/3.9.2_64bit/bin/python3"
|
|
fi
|
|
if [ -f "$PYTHON3" ]; then
|
|
EMSDK_PYTHON="$PYTHON3"
|
|
|
|
# When using our bundled python we never want the users
|
|
# PYTHONHOME or PYTHONPATH
|
|
# https://github.com/emscripten-core/emsdk/issues/598
|
|
unset PYTHONHOME
|
|
unset PYTHONPATH
|
|
fi
|
|
fi
|
|
|
|
# If bundled python is not found, look for `python3` in PATH. This is especially important on macOS (See:
|
|
# https://github.com/emscripten-core/emsdk/pull/273)
|
|
if [ -z "$EMSDK_PYTHON" ]; then
|
|
if PYTHON3="$(command -v python3 2>/dev/null)"; then
|
|
EMSDK_PYTHON=$PYTHON3
|
|
fi
|
|
fi
|
|
|
|
# Finally fall back to just looking for `python` in PATH
|
|
if [ -z "$EMSDK_PYTHON" ]; then
|
|
EMSDK_PYTHON=python
|
|
fi
|
|
|
|
exec "$EMSDK_PYTHON" "$0.py" "$@"
|