1 |
# Scons configuration file for modellib |
# Scons configuration file for modellib |
2 |
|
esysroot=str(Dir('./..').abspath) |
3 |
import os |
execfile(str(File(esysroot+"/scons/esys_options.py"))) |
|
import sys |
|
|
|
|
|
# |
|
|
# ensure correct versions of python and scons |
|
|
|
|
|
EnsurePythonVersion(2,3) |
|
|
EnsureSConsVersion(0,96) |
|
|
|
|
|
# |
|
|
# set appropriate defaults for configuration variables |
|
|
|
|
|
esysroot = Dir('#..') |
|
|
pyinstall = None |
|
|
|
|
|
# |
|
|
# import configuration variables passed in from |
|
|
# calling SConscript (if any) |
|
|
|
|
|
Import('*') |
|
|
|
|
|
# |
|
|
# retreive command-line arguments if any |
|
|
|
|
|
if ARGUMENTS.get('pyinstall',0): |
|
|
pyinstall = ARGUMENTS.get('pyinstall',0) |
|
|
pyinstall = Dir(str(pyinstall) + '/modellib') |
|
|
Export(["pyinstall"]) |
|
|
|
|
|
# |
|
|
# determine platform |
|
|
|
|
|
env = Environment(ENV = os.environ) |
|
|
platform = env['PLATFORM'] |
|
|
|
|
|
# |
|
|
# determine hostname |
|
|
|
|
|
import socket |
|
|
hostname = socket.gethostname() |
|
|
|
|
|
# |
|
|
# export esysroot |
|
|
|
|
|
Export(["esysroot"]) |
|
|
|
|
|
# |
|
|
# set and export python directory |
|
4 |
|
|
5 |
pydir = Dir(str(esysroot) + '/modellib/lib/py_src') |
pydir = Dir(str(esysroot) + '/modellib/lib/py_src') |
6 |
Export(["pydir"]) |
Export(["pydir"]) |
11 |
# print out build configuration for this module |
# print out build configuration for this module |
12 |
|
|
13 |
print "Build configuration for module: modellib" |
print "Build configuration for module: modellib" |
|
print " platform: ", platform |
|
|
print " hostname: ", hostname |
|
|
print " pyinstall: ", pyinstall |
|
|
|
|
14 |
# |
# |
15 |
# call the SConscript to do the actual build |
# call the SConscript to do the actual build |
16 |
|
|