1 |
pyinstall = None |
2 |
|
3 |
Import('*') |
4 |
|
5 |
import os |
6 |
import sys |
7 |
|
8 |
extensions_dir = str(esysroot) + '/scons' |
9 |
sys.path.append(extensions_dir) |
10 |
|
11 |
import scons_extensions |
12 |
|
13 |
modellibpy_env = Environment(ENV = os.environ) |
14 |
|
15 |
py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True) |
16 |
modellibpy_env.Append(BUILDERS = {'PyCompile' : py_builder}); |
17 |
|
18 |
python_src = ['__init__.py', |
19 |
'darcy.py', |
20 |
'flow.py', |
21 |
'geometry.py', |
22 |
'input.py', |
23 |
'materials.py', |
24 |
'probe.py', |
25 |
'temperature.py', |
26 |
'tsunami.py', |
27 |
'visualization.py'] |
28 |
|
29 |
pyc = modellibpy_env.PyCompile(python_src) |
30 |
modellibpy_env.Install(pydir, pyc) |
31 |
|
32 |
if pyinstall != None: |
33 |
modellibpy_env.Install(pyinstall, pyc) |