[SCons] Fix build errors when path to Python contains spaces
Adaptation of trunk r3075.
This commit is contained in:
parent
44b56a0fcf
commit
3eb6cb0f9d
3 changed files with 8 additions and 7 deletions
|
|
@ -864,6 +864,7 @@ if env['HAS_SUNDIALS'] and env['use_sundials'] != 'n':
|
|||
|
||||
env = conf.Finish()
|
||||
|
||||
env['python_cmd_esc'] = quoted(env['python_cmd'])
|
||||
|
||||
# Python 2 Package Settings
|
||||
cython_min_version = LooseVersion('0.17')
|
||||
|
|
@ -1253,7 +1254,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/python/ctml_writer.py $SOURCE $TARGET'))
|
||||
'$python_cmd_esc interfaces/python/ctml_writer.py $SOURCE $TARGET'))
|
||||
|
||||
|
||||
# Copy input files which are not present as cti:
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ if localenv['python_package'] == 'new':
|
|||
build(make_setup)
|
||||
|
||||
build_base = ('cd interfaces/cython &&'
|
||||
' $python_cmd setup2.py %s'
|
||||
' $python_cmd_esc setup2.py %s'
|
||||
' --build-lib=../../build/python2'
|
||||
' --build-temp=../../build/temp-py2'
|
||||
+ compilerOpt)
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ elif localenv['python_package'] == 'minimal':
|
|||
|
||||
moddir = pjoin('interfaces', 'python')
|
||||
localenv.AddPostAction(make_setup,
|
||||
'cd %s && $python_cmd setup.py build %s' % (moddir,
|
||||
extraArgs))
|
||||
'cd %s && $python_cmd_esc setup.py build %s' % (moddir,
|
||||
extraArgs))
|
||||
|
||||
# Install the Python module
|
||||
if localenv['python_prefix'] == 'USER':
|
||||
|
|
@ -88,7 +88,7 @@ else:
|
|||
|
||||
if localenv['PYTHON_INSTALLER'] == 'direct':
|
||||
mod_inst = install(localenv.Command, 'dummy', pymodule,
|
||||
'cd %s && $python_cmd setup.py install %s' % (moddir,extra) +
|
||||
'cd %s && $python_cmd_esc setup.py install %s' % (moddir,extra) +
|
||||
' --record ../../build/python-installed-files.txt')
|
||||
global_env = env
|
||||
def find_module_dir(target, source, env):
|
||||
|
|
@ -104,11 +104,11 @@ if localenv['PYTHON_INSTALLER'] == 'direct':
|
|||
|
||||
elif localenv['PYTHON_INSTALLER'] == 'debian':
|
||||
install(localenv.Command, 'dummy', pymodule,
|
||||
'cd %s && $python_cmd setup.py install %s --install-layout=deb --no-compile' % (moddir,extra))
|
||||
'cd %s && $python_cmd_esc setup.py install %s --install-layout=deb --no-compile' % (moddir,extra))
|
||||
env['python_module_loc'] = '<unspecified>'
|
||||
elif localenv['PYTHON_INSTALLER'] == 'binary':
|
||||
install(localenv.Command, 'dummy', pymodule,
|
||||
'cd %s && $python_cmd setup.py bdist_msi --dist-dir=../..' % moddir +
|
||||
'cd %s && $python_cmd_esc setup.py bdist_msi --dist-dir=../..' % moddir +
|
||||
' --target-version=' + distutils.sysconfig.get_python_version())
|
||||
env['python_module_loc'] = '<unspecified>'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue