Path: blob/main/tools/maint/run_python_compiler.sh
4150 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/run_python_compiler.sh` and11# then run `tools/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_NAME1617if [ -z "$PYTHON" ]; then18PYTHON=$EMSDK_PYTHON19fi2021if [ -z "$PYTHON" ]; then22PYTHON=$(command -v python3 2> /dev/null)23fi2425if [ -z "$PYTHON" ]; then26PYTHON=$(command -v python 2> /dev/null)27fi2829if [ -z "$PYTHON" ]; then30echo 'unable to find python in $PATH'31exit 132fi3334if [ -z "$_EMCC_CCACHE" ]; then35exec "$PYTHON" -E "$0.py" "$@"36else37unset _EMCC_CCACHE38exec ccache "$0" "$@"39fi404142