[SCons] Fix generation of ctpath.m

Was failing because of dependency on dynamically-generated 'python_module_loc'
variable.
This commit is contained in:
Ray Speth 2013-07-31 18:14:42 +00:00
parent 615c3124fb
commit 9b6354b0c0
2 changed files with 10 additions and 3 deletions

View file

@ -1,4 +1,4 @@
path('@ct_matlab_dir@', path)
path('@ct_matlab_dir@/1D', path)
setenv('PYTHON_CMD', '@python_cmd@')
setenv('PYTHONPATH', [getenv('PYTHONPATH'), ':@python_module_loc@'])
setenv('PYTHONPATH', [getenv('PYTHONPATH'), ':@python_module_loc_sc@'])

View file

@ -78,8 +78,15 @@ env['matlab_extension'] = ctmethods
### Install the Matlab toolbox ###
# 'ctpath.m'
target = build(localenv.SubstFile('#interfaces/matlab/ctpath.m',
'#interfaces/matlab/ctpath.m.in'))
def copy_var(target, source, env):
if env['python_prefix'] == 'USER':
env['python_module_loc_sc'] = ''
else:
env['python_module_loc_sc'] = env['python_module_loc']
target = localenv.SubstFile('#interfaces/matlab/ctpath.m',
'#interfaces/matlab/ctpath.m.in')
localenv.AddPreAction(target, copy_var)
install('$inst_matlab_dir', target)
# 'cantera_demos.m'