emscripten-2.0.8-py-runner.patch (1424B)
1 diff --git a/tools/create_entry_points.py b/tools/create_entry_points.py 2 index ced34f23b..91926614b 100755 3 --- a/tools/create_entry_points.py 4 +++ b/tools/create_entry_points.py 5 @@ -41,10 +41,9 @@ def main(): 6 sh_file = os.path.join(tools_dir, 'run_python.sh') 7 bat_file = os.path.join(tools_dir, 'run_python.bat') 8 for entry_point in entry_points: 9 - if os.path.exists(os.path.join(root_dir, entry_point)): 10 - os.remove(os.path.join(root_dir, entry_point)) 11 shutil.copy2(sh_file, os.path.join(root_dir, entry_point)) 12 - shutil.copy2(bat_file, os.path.join(root_dir, entry_point) + '.bat') 13 + if not entry_point.startswith('tools'): 14 + shutil.copy2(sh_file, os.path.join(os.environ['ED'], 'usr/bin', entry_point)) 15 16 17 if __name__ == '__main__': 18 diff --git a/tools/run_python.sh b/tools/run_python.sh 19 index b9fcf9532..de6e1b60b 100755 20 --- a/tools/run_python.sh 21 +++ b/tools/run_python.sh 22 @@ -9,21 +9,4 @@ 23 # To modify this file, edit `tools/run_python.sh` and then run 24 # `tools/create_entry_points.py` 25 26 -if [ -z "$PYTHON" ]; then 27 - PYTHON=$EMSDK_PYTHON 28 -fi 29 - 30 -if [ -z "$PYTHON" ]; then 31 - PYTHON=$(which python3 2> /dev/null) 32 -fi 33 - 34 -if [ -z "$PYTHON" ]; then 35 - PYTHON=$(which python 2> /dev/null) 36 -fi 37 - 38 -if [ -z "$PYTHON" ]; then 39 - echo 'unable to find python in $PATH' 40 - exit 1 41 -fi 42 - 43 -exec "$PYTHON" "$0.py" "$@" 44 +GENTOO_PYTHON "GENTOO_PREFIX/usr/GENTOO_LIB/emscripten/$(basename $0).py" "$@"