Use a wrapper script for running emsdk.py (#292)

This change moves the python code for emsdk into a file ending in .py.
This script is then run via emsdk.bat on windows or emsdk (a shell
script) on non-windows.

This avoid the #!/bin/sh at the top of the python script and the "exec"
hack on the first line that re-runs it under python.  Hopefully this
preserves the intent of #273 without jumping through so many hoops.
This commit is contained in:
Sam Clegg
2019-08-27 14:02:50 -07:00
committed by GitHub
parent 5c93ca29bd
commit a562ff7bda
6 changed files with 2789 additions and 2804 deletions

View File

@@ -33,7 +33,7 @@ def failing_call_with_output(cmd, expected):
assert expected in stdout, 'call did not have the right output'
def hack_emsdk(marker, replacement):
src = open('emsdk').read()
src = open('emsdk.py').read()
assert marker in src
src = src.replace(marker, replacement)
name = '__test_emsdk'
@@ -89,7 +89,7 @@ print('update')
check_call('./emsdk update-tags')
print('test latest-releases-upstream')
check_call('python2 ./emsdk install latest-upstream')
check_call('python2 ./emsdk.py install latest-upstream')
check_call('./emsdk activate latest-upstream')
test_lib_building('upstream', use_asmjs_optimizer=False)
assert open(os.path.expanduser('~/.emscripten')).read().count('LLVM_ROOT') == 1