Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/tools/maint/run_python_compiler.sh
6162 views
1
#!/bin/sh
2
# Copyright 2020 The Emscripten Authors. All rights reserved.
3
# Emscripten is available under two separate licenses, the MIT license and the
4
# University of Illinois/NCSA Open Source License. Both these licenses can be
5
# found in the LICENSE file.
6
#
7
# Entry point for running python scripts on UNIX systems.
8
#
9
# Automatically generated by `create_entry_points.py`; DO NOT EDIT.
10
#
11
# To make modifications to this file, edit `tools/maint/run_python_compiler.sh` and
12
# then run `tools/maint/create_entry_points.py`
13
14
# python -E will not ignore _PYTHON_SYSCONFIGDATA_NAME an internal
15
# of cpython used in cross compilation via setup.py.
16
unset _PYTHON_SYSCONFIGDATA_NAME
17
18
_EM_PY=$EMSDK_PYTHON
19
20
if [ -z "$_EM_PY" ]; then
21
_EM_PY=$(command -v python3 2> /dev/null)
22
fi
23
24
if [ -z "$_EM_PY" ]; then
25
_EM_PY=$(command -v python 2> /dev/null)
26
fi
27
28
if [ -z "$_EM_PY" ]; then
29
echo 'unable to find python in $PATH'
30
exit 1
31
fi
32
33
if [ -z "$_EMCC_CCACHE" ]; then
34
exec "$_EM_PY" -E "$0.py" "$@"
35
else
36
unset _EMCC_CCACHE
37
exec ccache "$0" "$@"
38
fi
39
40