42 |
# Where to install esys stuff |
# Where to install esys stuff |
43 |
('prefix', 'where everything will be installed', Dir('#.').abspath), |
('prefix', 'where everything will be installed', Dir('#.').abspath), |
44 |
('incinstall', 'where the esys headers will be installed', os.path.join(Dir('#.').abspath,'include')), |
('incinstall', 'where the esys headers will be installed', os.path.join(Dir('#.').abspath,'include')), |
45 |
|
('bininstall', 'where the esys binaries will be installed', os.path.join(prefix,'bin')), |
46 |
('libinstall', 'where the esys libraries will be installed', os.path.join(prefix,'lib')), |
('libinstall', 'where the esys libraries will be installed', os.path.join(prefix,'lib')), |
47 |
('pyinstall', 'where the esys python modules will be installed', os.path.join(prefix,'esys')), |
('pyinstall', 'where the esys python modules will be installed', os.path.join(prefix,'esys')), |
48 |
# Compilation options |
# Compilation options |
187 |
|
|
188 |
if env['omp_optim'] == "" and env['omp_debug'] == "": env["useopenmp"] = 0 |
if env['omp_optim'] == "" and env['omp_debug'] == "": env["useopenmp"] = 0 |
189 |
|
|
|
Execute(Delete(env['libinstall'] + "/Compiled.with.debug")) |
|
|
Execute(Delete(env['libinstall'] + "/Compiled.with.mpi")) |
|
|
Execute(Delete(env['libinstall'] + "/Compiled.with.openmp")) |
|
|
if not env['useMPI']: Execute(Delete(env['libinstall'] + "/pythonMPI")) |
|
|
|
|
190 |
############ Copy environment variables into scons env ######### |
############ Copy environment variables into scons env ######### |
191 |
|
|
192 |
try: env['ENV']['OMP_NUM_THREADS'] = os.environ['OMP_NUM_THREADS'] |
try: env['ENV']['OMP_NUM_THREADS'] = os.environ['OMP_NUM_THREADS'] |
223 |
env.PrependENVPath('PYTHONPATH', prefix) |
env.PrependENVPath('PYTHONPATH', prefix) |
224 |
env.PrependENVPath('LD_LIBRARY_PATH', env['libinstall']) |
env.PrependENVPath('LD_LIBRARY_PATH', env['libinstall']) |
225 |
|
|
226 |
|
env['ENV']['ESCRIPT_ROOT'] = prefix |
227 |
|
|
228 |
############ Set up paths for Configure() ###################### |
############ Set up paths for Configure() ###################### |
229 |
|
|
230 |
# Make a copy of an environment |
# Make a copy of an environment |
504 |
print " Installing in", prefix |
print " Installing in", prefix |
505 |
print "" |
print "" |
506 |
|
|
507 |
|
############ Delete option-dependent files ##################### |
508 |
|
|
509 |
|
Execute(Delete(env['libinstall'] + "/Compiled.with.debug")) |
510 |
|
Execute(Delete(env['libinstall'] + "/Compiled.with.mpi")) |
511 |
|
Execute(Delete(env['libinstall'] + "/Compiled.with.openmp")) |
512 |
|
if not env['usempi']: Execute(Delete(env['libinstall'] + "/pythonMPI")) |
513 |
|
|
514 |
############ Add some custom builders ########################## |
############ Add some custom builders ########################## |
515 |
|
|
516 |
py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True) |
py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True) |
522 |
runPyUnitTest_builder = Builder(action = scons_extensions.runPyUnitTest, suffix = '.passed', src_suffic='.py', single_source=True) |
runPyUnitTest_builder = Builder(action = scons_extensions.runPyUnitTest, suffix = '.passed', src_suffic='.py', single_source=True) |
523 |
env.Append(BUILDERS = {'RunPyUnitTest' : runPyUnitTest_builder}); |
env.Append(BUILDERS = {'RunPyUnitTest' : runPyUnitTest_builder}); |
524 |
|
|
525 |
############ Build the desired subdirectories ################## |
############ Build the subdirectories ########################## |
526 |
|
|
527 |
Export(["env", "env_mpi", "clone_env"]) |
Export(["env", "env_mpi", "clone_env"]) |
528 |
|
|
536 |
env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0) |
537 |
env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0) |
env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0) |
538 |
env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0) |
env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0) |
539 |
|
env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0) |
540 |
|
|
541 |
############ Remember what optimizations we used ############### |
############ Remember what optimizations we used ############### |
542 |
|
|
577 |
build_all_list += ['build_paso'] |
build_all_list += ['build_paso'] |
578 |
build_all_list += ['build_escript'] |
build_all_list += ['build_escript'] |
579 |
build_all_list += ['build_finley'] |
build_all_list += ['build_finley'] |
580 |
if env['usempi']: build_all_list += ['target_pythonMPI_exe'] |
if env['usempi']: build_all_list += ['target_pythonMPI_exe'] |
581 |
|
if not IS_WINDOWS_PLATFORM: build_all_list += ['target_finley_wrapper'] |
582 |
env.Alias('build_all', build_all_list) |
env.Alias('build_all', build_all_list) |
583 |
|
|
584 |
install_all_list = [] |
install_all_list = [] |
590 |
install_all_list += ['target_install_pyvisi_py'] |
install_all_list += ['target_install_pyvisi_py'] |
591 |
install_all_list += ['target_install_modellib_py'] |
install_all_list += ['target_install_modellib_py'] |
592 |
install_all_list += ['target_install_pycad_py'] |
install_all_list += ['target_install_pycad_py'] |
593 |
if env['usempi']: install_all_list += ['target_install_pythonMPI_exe'] |
if env['usempi']: install_all_list += ['target_install_pythonMPI_exe'] |
594 |
|
if not IS_WINDOWS_PLATFORM: install_all_list += ['target_install_finley_wrapper'] |
595 |
install_all_list += ['remember_options'] |
install_all_list += ['remember_options'] |
596 |
env.Alias('install_all', install_all_list) |
env.Alias('install_all', install_all_list) |
597 |
|
|