Path: blob/main/tools/maint/run_python_compiler.sh
6162 views
#!/bin/sh1# Copyright 2020 The Emscripten Authors. All rights reserved.2# Emscripten is available under two separate licenses, the MIT license and the3# University of Illinois/NCSA Open Source License. Both these licenses can be4# found in the LICENSE file.5#6# Entry point for running python scripts on UNIX systems.7#8# Automatically generated by `create_entry_points.py`; DO NOT EDIT.9#10# To make modifications to this file, edit `tools/maint/run_python_compiler.sh` and11# then run `tools/maint/create_entry_points.py`1213# python -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal14# of cpython used in cross compilation via setup.py.15unset _PYTHON_SYSCONFIGDATA_NAME1617_EM_PY=$EMSDK_PYTHON1819if [ -z "$_EM_PY" ]; then20_EM_PY=$(command -v python3 2> /dev/null)21fi2223if [ -z "$_EM_PY" ]; then24_EM_PY=$(command -v python 2> /dev/null)25fi2627if [ -z "$_EM_PY" ]; then28echo 'unable to find python in $PATH'29exit 130fi3132if [ -z "$_EMCC_CCACHE" ]; then33exec "$_EM_PY" -E "$0.py" "$@"34else35unset _EMCC_CCACHE36exec ccache "$0" "$@"37fi383940