Skip to content

Commit 315f13e

Browse files
author
Alan Kligman
committed
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.
1 parent 1c79663 commit 315f13e

34 files changed

Lines changed: 217 additions & 193 deletions

em++

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
See emcc.py. This script forwards to there, noting that we want C++ and not C by default
@@ -8,5 +8,5 @@ import os, subprocess, sys
88
from tools import shared
99

1010
os.environ['EMMAKEN_CXX'] = '1'
11-
exit(subprocess.call(['python', shared.EMCC] + sys.argv[1:]))
11+
exit(subprocess.call(['python2', shared.EMCC] + sys.argv[1:]))
1212

em-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
This is a helper tool which is designed to make it possible

emar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
emar - ar helper script

emcc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
emcc - compiler helper script
@@ -925,9 +925,9 @@ try:
925925
# dlmalloc
926926
def create_dlmalloc():
927927
if DEBUG: print >> sys.stderr, 'emcc: building dlmalloc for cache'
928-
execute(shared.ENV_PREFIX + ['python', shared.EMCC, shared.path_from_root('system', 'lib', 'dlmalloc.c'), '-g', '-o', in_temp('dlmalloc.o')], stdout=stdout, stderr=stderr)
928+
execute(shared.ENV_PREFIX + ['python2', shared.EMCC, shared.path_from_root('system', 'lib', 'dlmalloc.c'), '-g', '-o', in_temp('dlmalloc.o')], stdout=stdout, stderr=stderr)
929929
# we include the libc++ new stuff here, so that the common case of using just new/delete is quick to link
930-
execute(shared.ENV_PREFIX + ['python', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', 'new.cpp'), '-g', '-o', in_temp('new.o')], stdout=stdout, stderr=stderr)
930+
execute(shared.ENV_PREFIX + ['python2', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', 'new.cpp'), '-g', '-o', in_temp('new.o')], stdout=stdout, stderr=stderr)
931931
shared.Building.link([in_temp('dlmalloc.o'), in_temp('new.o')], in_temp('dlmalloc_full.o'))
932932
return in_temp('dlmalloc_full.o')
933933
def fix_dlmalloc():
@@ -950,7 +950,7 @@ try:
950950
os = []
951951
for src in ['algorithm.cpp', 'condition_variable.cpp', 'future.cpp', 'iostream.cpp', 'memory.cpp', 'random.cpp', 'stdexcept.cpp', 'system_error.cpp', 'utility.cpp', 'bind.cpp', 'debug.cpp', 'hash.cpp', 'mutex.cpp', 'string.cpp', 'thread.cpp', 'valarray.cpp', 'chrono.cpp', 'exception.cpp', 'ios.cpp', 'locale.cpp', 'regex.cpp', 'strstream.cpp', 'typeinfo.cpp']:
952952
o = in_temp(src + '.o')
953-
execute(shared.ENV_PREFIX + ['python', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', src), '-o', o], stdout=stdout, stderr=stderr)
953+
execute(shared.ENV_PREFIX + ['python2', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', src), '-o', o], stdout=stdout, stderr=stderr)
954954
os.append(o)
955955
shared.Building.link(os, in_temp('libcxx.bc'))
956956
return in_temp('libcxx.bc')
@@ -969,7 +969,7 @@ try:
969969
os = []
970970
for src in ['private_typeinfo.cpp']:
971971
o = in_temp(src + '.o')
972-
execute(shared.ENV_PREFIX + ['python', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxxabi', 'src', src), '-o', o], stdout=stdout, stderr=stderr)
972+
execute(shared.ENV_PREFIX + ['python2', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxxabi', 'src', src), '-o', o], stdout=stdout, stderr=stderr)
973973
os.append(o)
974974
shared.Building.link(os, in_temp('libcxxabi.bc'))
975975
return in_temp('libcxxabi.bc')
@@ -1075,7 +1075,7 @@ try:
10751075

10761076
if AUTODEBUG:
10771077
if DEBUG: print >> sys.stderr, 'emcc: autodebug'
1078-
execute(shared.ENV_PREFIX + ['python', shared.AUTODEBUGGER, final, final + '.ad.ll'])
1078+
execute(shared.ENV_PREFIX + ['python2', shared.AUTODEBUGGER, final, final + '.ad.ll'])
10791079
final += '.ad.ll'
10801080
if DEBUG: save_intermediate('autodebug', 'll')
10811081

@@ -1098,7 +1098,7 @@ try:
10981098
file_args += embed_files
10991099
if Compression.on:
11001100
file_args += ['--compress', Compression.encoder, Compression.decoder, Compression.js_name]
1101-
code = execute(shared.ENV_PREFIX + ['python', shared.FILE_PACKAGER, unsuffixed(target) + '.data'] + file_args, stdout=PIPE)[0]
1101+
code = execute(shared.ENV_PREFIX + ['python2', shared.FILE_PACKAGER, unsuffixed(target) + '.data'] + file_args, stdout=PIPE)[0]
11021102
src = open(final).read().replace('// {{PRE_RUN_ADDITIONS}}', '// {{PRE_RUN_ADDITIONS}}\n' + code)
11031103
final += '.files.js'
11041104
open(final, 'w').write(src)

emconfigure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
This is a helper script. It runs ./configure for you, setting

emlibtool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
This is a helper script. See emcc.

emmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
This is a helper script. It runs make for you, setting

emranlib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
emcc - ranlib helper script

emscripten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22

33
'''
44
You should normally never use this! Use emcc instead.

tests/freetype/src/tools/chktrcmp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
#
33
# Check trace components in FreeType 2 source.
44
# Author: suzuki toshiya, 2009

0 commit comments

Comments
 (0)