Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/tools/maint/run_python.sh
4150 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/run_python.sh` and then run
12
# `tools/maint/create_entry_points.py`
13
14
# $PYTHON -E does not ignore _PYTHON_SYSCONFIGDATA_NAME, an internal of cpython
15
# used in cross compilation via setup.py, so we unset it explicitly here.
16
unset _PYTHON_SYSCONFIGDATA_NAME
17
18
if [ -z "$PYTHON" ]; then
19
PYTHON=$EMSDK_PYTHON
20
fi
21
22
if [ -z "$PYTHON" ]; then
23
PYTHON=$(command -v python3 2> /dev/null)
24
fi
25
26
if [ -z "$PYTHON" ]; then
27
PYTHON=$(command -v python 2> /dev/null)
28
fi
29
30
if [ -z "$PYTHON" ]; then
31
echo 'unable to find python in $PATH'
32
exit 1
33
fi
34
35
exec "$PYTHON" -E "$0.py" "$@"
36
37