Skip to content

Commit

Permalink
ensure subprocesses run under the current interpreter to avoid py3k bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
C Anthony Risinger committed Oct 20, 2010
1 parent da4cc80 commit 0c5561c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyjs/src/pyjs/linker.py
Expand Up @@ -107,7 +107,10 @@ def out_translate(platform, file_names, out_file, module_name,
opts = ["--module-name", module_name,
"-o", out_file.replace(" ", r"\ "),
] + get_translator_opts(translator_args) + file_names
opts = ['python'] + ['translator.py'] + opts
exe = os.path.realpath(sys.executable) if sys.executable else None
if exe is None or not os.access(exe, os.X_OK):
exe = 'python'
opts = [exe] + ['translator.py'] + opts
pyjscompile_cmd = ' '.join(opts)
#print pyjscompile_cmd - use this to create Makefile code-fragment
proc = subprocess.Popen(pyjscompile_cmd,
Expand Down

0 comments on commit 0c5561c

Please sign in to comment.