aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlan Kligman <alan.kligman@gmail.com>2012-12-19 15:20:20 -0500
committerAlan Kligman <alan.kligman@gmail.com>2012-12-19 18:06:48 -0500
commit6ef49ebf698f670f667cddfbd4f0f8fcb3789456 (patch)
tree2686c36cdc2280833d972dd60b49584e0e8c7a36 /tools/shared.py
parent5eb806577f88f11a4e587eb4936b5329358dc367 (diff)
Added support for python in auto-generated config so that warnings about PYTHON not being defined are not emitted.
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index dc3e2a30..461f0561 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -96,6 +96,12 @@ else:
except:
pass
config_file = config_file.replace('{{{ NODE }}}', node)
+ python = 'python'
+ try:
+ python = Popen(['which', 'python'], stdout=PIPE).communicate()[0].replace('\n', '')
+ except:
+ pass
+ config_file = config_file.replace('{{{ PYTHON }}}', python)
# write
open(CONFIG_FILE, 'w').write(config_file)
@@ -110,6 +116,7 @@ A settings file has been copied to %s, at absolute path: %s
It contains our best guesses for the important paths, which are:
LLVM_ROOT = %s
+ PYTHON = %s
NODE_JS = %s
EMSCRIPTEN_ROOT = %s
@@ -117,7 +124,7 @@ Please edit the file if any of those are incorrect.
This command will now exit. When you are done editing those paths, re-run it.
==============================================================================
-''' % (EM_CONFIG, CONFIG_FILE, llvm_root, node, __rootpath__)
+''' % (EM_CONFIG, CONFIG_FILE, llvm_root, python, node, __rootpath__)
sys.exit(0)
try:
config_text = open(CONFIG_FILE, 'r').read() if CONFIG_FILE else EM_CONFIG