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.
This commit is contained in:
Robert Bragg 2013-04-09 21:32:09 +01:00
Родитель 48ae14de71
Коммит 3e4bd21bda
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -68,4 +68,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Llorens Marti Garcia <lgarcia@imvu.com> (copyright owned by IMVU)
* Jinsuck Kim <jkim@imvu.com> (copyright owned by IMVU)
* Todd Lee <tlee@imvu.com> (copyright owned by IMVU)
* Anthony Pesch <inolen@gmail.com>
* Anthony Pesch <inolen@gmail.com>
* Robert Bragg <robert.bragg@intel.com> (copyright owned by Intel Corporation)

Просмотреть файл

@ -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)