[Scons] Fix build order dependencies for python modules
This commit is contained in:
parent
6126521ff3
commit
a22ceda566
3 changed files with 9 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ def configure_numpy(python_command):
|
|||
def add_dependencies(mod, ext):
|
||||
localenv.Depends(mod, ext)
|
||||
localenv.Depends(ext, localenv['cantera_staticlib'])
|
||||
localenv.Depends(mod, dataFiles + testFiles)
|
||||
localenv.Depends(mod, dataFiles + testFiles + scripts)
|
||||
for f in mglob(localenv, 'cantera', 'pyx', 'pxd'):
|
||||
localenv.Depends(ext, f)
|
||||
|
||||
|
|
@ -56,10 +56,12 @@ build(env.Command('cantera/ck2cti.py',
|
|||
Copy('$TARGET', '$SOURCE')))
|
||||
|
||||
# thin wrappers
|
||||
scripts = []
|
||||
for script in mglob(env, 'scripts', 'py.in'):
|
||||
base_name = script.name.split('.')[0]
|
||||
build(env.Command('scripts/%s%s' % (base_name, script_ext), script,
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
script = build(env.Command('scripts/%s%s' % (base_name, script_ext), script,
|
||||
Copy('$TARGET', '$SOURCE')))
|
||||
scripts.append(script)
|
||||
|
||||
def install_module(prefix, python_version):
|
||||
if prefix == 'USER':
|
||||
|
|
@ -89,6 +91,8 @@ def install_module(prefix, python_version):
|
|||
global_env['python%s_module_loc' % ver] = os.path.normpath(filename)
|
||||
break
|
||||
localenv.AlwaysBuild(localenv.AddPostAction(mod_inst, find_module_dir))
|
||||
if not ver:
|
||||
env['install_python2_action'] = mod_inst
|
||||
|
||||
elif localenv['PYTHON_INSTALLER'] == 'debian':
|
||||
install(localenv.Command, dummy, mod,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ if localenv['layout'] != 'debian':
|
|||
|
||||
target = env.SubstFile('setup_cantera', 'setup_cantera.in')
|
||||
localenv.AddPreAction(target, copy_var)
|
||||
localenv.Depends(target, env['install_python2_action'])
|
||||
install('$inst_bindir', target)
|
||||
|
||||
# 'mixmaster'
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ if localenv['PYTHON_INSTALLER'] == 'direct':
|
|||
global_env['python_module_loc'] = os.path.normpath(filename)
|
||||
break
|
||||
localenv.AlwaysBuild(localenv.AddPostAction(mod_inst, find_module_dir))
|
||||
env['install_python2_action'] = mod_inst
|
||||
|
||||
elif localenv['PYTHON_INSTALLER'] == 'debian':
|
||||
install(localenv.Command, 'dummy', pymodule,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue