11 |
# |
# |
12 |
######################################################## |
######################################################## |
13 |
|
|
|
|
|
|
import os |
|
14 |
Import('*') |
Import('*') |
15 |
|
local_env = env.Clone() |
16 |
|
|
17 |
local_env = clone_env(env) |
# get the source file names |
18 |
|
sources = Glob('*.py') |
|
src_dir = local_env.Dir('.').srcnode().abspath |
|
|
|
|
|
filenames = os.listdir(src_dir) |
|
|
python_src = [ x for x in filenames if os.path.splitext(x)[1] in ['.py'] ] |
|
|
|
|
|
pyc = local_env.PyCompile(python_src) |
|
|
|
|
|
local_env.Depends(pyc, dep_lib) |
|
19 |
|
|
20 |
tmp2 = local_env.Install(local_env['bininstall'], 'runmodel.py') |
# compile |
21 |
|
pyc = local_env.PyCompile(sources) |
22 |
|
|
23 |
tmp1 = local_env.Install(local_env['pyinstall']+'/escript', pyc) |
# install |
24 |
env.Alias('target_install_escript_py', [tmp1, tmp2]) |
runmodel_inst = local_env.Install(local_env['bininstall'], 'runmodel.py') |
25 |
|
py_inst = local_env.Install(local_env['pyinstall']+'/escript', pyc) |
26 |
|
env.Alias('install_escript_py', [runmodel_inst, py_inst]) |
27 |
|
|