diff options
author | Alan Kligman <alan.kligman@gmail.com> | 2012-12-01 18:31:36 -0500 |
---|---|---|
committer | Alan Kligman <alan.kligman@gmail.com> | 2012-12-19 18:06:48 -0500 |
commit | 315f13e5a1b35e23241da080f0df16e80ece88ae (patch) | |
tree | ed8d07eb649011f9b10b6f3a749073c37b033aca /tools/shared.py | |
parent | 1c796635aa711764d18a47577d5e94ead309506c (diff) |
Updated scripts to call python2 directly rather than relying on python symlink pointing to the right place. See PEP394 for details on why this should be OK.
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/shared.py b/tools/shared.py index 4b63d436..499df793 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -378,7 +378,7 @@ WINDOWS = sys.platform.startswith('win') ENV_PREFIX = [] if not WINDOWS: try: - assert 'Python' in Popen(['env', 'python', '-V'], stdout=PIPE, stderr=STDOUT).communicate()[0] + assert 'Python' in Popen(['env', 'python2', '-V'], stdout=PIPE, stderr=STDOUT).communicate()[0] ENV_PREFIX = ['env'] except: pass @@ -862,13 +862,13 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e if output_filename is None: output_filename = filename + '.o' try_delete(output_filename) - Popen(ENV_PREFIX + ['python', EMCC, filename] + args + ['-o', output_filename], stdout=stdout, stderr=stderr, env=env).communicate() + Popen(ENV_PREFIX + ['python2', EMCC, filename] + args + ['-o', output_filename], stdout=stdout, stderr=stderr, env=env).communicate() assert os.path.exists(output_filename), 'emcc could not create output file' @staticmethod def emar(action, output_filename, filenames, stdout=None, stderr=None, env=None): try_delete(output_filename) - Popen(ENV_PREFIX + ['python', EMAR, action, output_filename] + filenames, stdout=stdout, stderr=stderr, env=env).communicate() + Popen(ENV_PREFIX + ['python2', EMAR, action, output_filename] + filenames, stdout=stdout, stderr=stderr, env=env).communicate() if 'c' in action: assert os.path.exists(output_filename), 'emar could not create output file' @@ -879,7 +879,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e # Run Emscripten settings = Settings.serialize() - compiler_output = timeout_run(Popen(ENV_PREFIX + ['python', EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + settings + extra_args, stdout=PIPE), None, 'Compiling') + compiler_output = timeout_run(Popen(ENV_PREFIX + ['python2', EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + settings + extra_args, stdout=PIPE), None, 'Compiling') #print compiler_output # Detect compilation crashes and errors |