From e94ec9598865a10fc3361c96f667b1c2fdb06f7b Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 6 Jan 2015 23:37:30 +0000 Subject: [PATCH] [Python] Specify python executable to be used in shebang line for scripts This fixes a bug in the Windows installer where the path to python.exe on the machine where the installer is built is used, and also allows us generate different shebang lines for the Python 2 and Python 3 modules. Fixes Issue 247. --- interfaces/cython/SConscript | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interfaces/cython/SConscript b/interfaces/cython/SConscript index 1680c9018..ba71e18af 100644 --- a/interfaces/cython/SConscript +++ b/interfaces/cython/SConscript @@ -142,7 +142,8 @@ if localenv['python3_package'] == 'y': py3env.SubstFile('setup3.py', 'setup.py.in') build_cmd = ('cd interfaces/cython &&' - ' $python3_cmd setup3.py build --build-lib=../../build/python3') + ' $python3_cmd setup3.py build --build-lib=../../build/python3' + ' --executable="/usr/bin/env python3"') mod = build(py3env.Command('#build/python3/cantera/__init__.py', 'setup3.py', build_cmd)) env['python3_module'] = mod @@ -164,7 +165,8 @@ if localenv['python_package'] == 'full': py2env['py_extension'] = ext[0].name py2env.SubstFile('setup2.py', 'setup.py.in') build_cmd = ('cd interfaces/cython &&' - ' $python_cmd_esc setup2.py build --build-lib=../../build/python2') + ' $python_cmd_esc setup2.py build --build-lib=../../build/python2' + ' --executable="/usr/bin/env python"') mod = build(py2env.Command('#build/python2/cantera/__init__.py', 'setup2.py', build_cmd))