[SCons] Fix generation of ctpath.m
Was failing because of dependency on dynamically-generated 'python_module_loc' variable.
This commit is contained in:
parent
615c3124fb
commit
9b6354b0c0
2 changed files with 10 additions and 3 deletions
|
|
@ -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@'])
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue