[SCons] Fix build errors when path to Python contains spaces

This commit is contained in:
Ray Speth
2014-07-25 18:32:54 +00:00
parent 93719f0261
commit 4f3dd0624f
3 changed files with 5 additions and 3 deletions

View File

@@ -888,6 +888,8 @@ if env['VERBOSE']:
print open('config.log').read()
print '--------------------- end config.log ---------------------'
env['python_cmd_esc'] = quoted(env['python_cmd'])
# Python 2 Package Settings
cython_min_version = LooseVersion('0.17')
env['install_python2_action'] = ''
@@ -1270,7 +1272,7 @@ for cti in mglob(env, 'data/inputs', 'cti'):
outName = os.path.splitext(cti.name)[0] + '.xml'
convertedInputFiles.add(outName)
build(env.Command('build/data/%s' % outName, cti.path,
'$python_cmd interfaces/cython/cantera/ctml_writer.py $SOURCE $TARGET'))
'$python_cmd_esc interfaces/cython/cantera/ctml_writer.py $SOURCE $TARGET'))
# Copy input files which are not present as cti:

View File

@@ -159,7 +159,7 @@ 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 setup2.py build --build-lib=../../build/python2')
' $python_cmd_esc setup2.py build --build-lib=../../build/python2')
mod = build(py2env.Command('#build/python2/cantera/__init__.py',
'setup2.py',
build_cmd))

View File

@@ -27,7 +27,7 @@ for script in ['ctml_writer', 'ck2cti']:
localenv['py_%s' % script] = repr('scripts/%s%s' % (script, script_ext))
build_cmd = ('cd interfaces/python_minimal &&'
' $python_cmd setup.py build --build-lib=../../build/python2')
' $python_cmd_esc setup.py build --build-lib=../../build/python2')
mod = build(localenv.Command('#build/python2/cantera/__init__.py',
'setup.py',