aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobert Bragg <robert.bragg@intel.com>2013-04-09 21:32:09 +0100
committerRobert Bragg <robert.bragg@intel.com>2013-04-30 19:30:42 +0100
commit3e4bd21bda50ba3bd83ec86e308201d7ec12e16b (patch)
tree4b04fdd19dfd29520966d998be7c1d1f370292bd /tools
parent48ae14de71a389f29fdb6542e04e1c805788f5bb (diff)
look for python2 before python for default .emscripten
emscripten requires python 2 but some systems have multiple versions of python installed and the 'python' binary will correspond to python 3. We now explicitly look for a python2 first when setting up a default .emscripten config file.
Diffstat (limited to 'tools')
-rw-r--r--tools/shared.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 0dbae1d0..25455ff6 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -124,7 +124,8 @@ else:
config_file = config_file.replace('{{{ NODE }}}', node)
python = 'python'
try:
- python = Popen(['which', 'python'], stdout=PIPE).communicate()[0].replace('\n', '')
+ python = Popen(['which', 'python2'], stdout=PIPE).communicate()[0].replace('\n', '') or \
+ Popen(['which', 'python'], stdout=PIPE).communicate()[0].replace('\n', '') or python
except:
pass
config_file = config_file.replace('{{{ PYTHON }}}', python)