Changeset 1184 for trunk/SConstruct
- Timestamp:
- 08/25/06 16:34:59 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r1182 r1184 3 3 import distutils.sysconfig 4 4 import platform 5 import SCons 5 6 # scons plug-ins 6 7 #from installtree import InstallTree 7 8 8 version = "2.1.0b"9 9 moduledir = distutils.sysconfig.get_python_lib() 10 10 if platform.architecture()[0] == '64bit': … … 31 31 32 32 env = Environment( toolpath = ['./scons'], 33 tools = ["default", " installtree", "casa",34 " utils"],33 tools = ["default", "casa", "archiver", "utils", 34 "quietinstall"], 35 35 ENV = { 'PATH' : os.environ[ 'PATH' ], 36 36 'HOME' : os.environ[ 'HOME' ] }, … … 76 76 env = conf.Finish() 77 77 78 env[" stage_dir"] = Dir("#/stage/asap")78 env["version"] = "2.1.0b" 79 79 80 80 # general CPPFLAGS … … 85 85 env.Append(CPPFLAGS=['-fPIC', '-D__x86_64__', '-DAIPS_64B']) 86 86 87 if env["PLATFORM"] == "darwin":88 env['SHLINKFLAGS'] = '$LINKFLAGS -bundle'89 #env['SHLIBSUFFIX'] = '.dylib'90 91 87 if env['mode'] == 'release': 92 88 env.Append(LINKFLAGS=['-Wl,-O1']) 89 90 # Export for SConscript files 93 91 Export("env") 94 92 93 # build library 95 94 so = env.SConscript("src/SConscript", build_dir="build", duplicate=0) 96 stagebuild = env.Install(env["stage_dir"], so ) 97 stagedoc = env.Install("stage", ["doc/README", "doc/CHANGELOG"] ) 98 stagepys = env.SConscript("python/SConscript") 99 stage0 = env.Install("stage", "bin/install") 100 stage1 = env.Install("stage/bin", ["bin/asap", "bin/asap_update_data"]) 101 stage2 = env.Install("stage/data", "share/ipythonrc-asap") 102 env.Alias('stage', [stagebuild,stagedoc,stagepys, stage0, stage1, stage2]) 103 # install locally 104 asapmod = env.InstallTree(dest_dir = os.path.join(env["moduledir"], "asap"), 105 src_dir = "stage", 106 includes = ['asap','data'], 107 excludes = []) 108 asapbin = env.Install(os.path.join(env["prefix"], "bin"), "bin/asap") 109 env.Alias('install', [asapmod, asapbin]) 95 96 # install targets 97 somod = env.Install("$moduledir/asap", so ) 98 pymods = env.Install("$moduledir/asap", env.SGlob("python/*.py")) 99 bins = env.Install("$prefix/bin", ["bin/asap", "bin/asap_update_data"]) 100 shares = env.Install("$moduledir/data", "share/ipythonrc-asap") 101 env.Alias('install', [somod, pymods, bins, shares]) 102 103 # install aips++ data repos 104 rootdir=None 105 outdir = os.path.join(env["moduledir"],'asap','data') 106 sources = ['ephemerides','geodetic'] 107 if os.path.exists("/nfs/aips++/data"): 108 rootdir = "/nfs/aips++/data" 109 elif os.path.exists("data"): 110 rootdir = "data" 111 if rootdir is not None: 112 ofiles, ifiles = env.WalkDirTree(outdir, rootdir, sources) 113 data = env.InstallAs(ofiles, ifiles) 114 env.Alias('install', data) 115 110 116 # make binary distribution 111 117 if len(env["makedist"]): 112 md =env.CreateDist("dist/asap-%s-%s" % (version, env["makedist"]), 113 ["install", "README", "CHANGELOG", "asap", "data", 114 "bin"], 115 "stage") 118 env["stagedir"] = "asap-%s-%s" % (env["version"], env["makedist"]) 119 env.Command('Staging distribution for archive in %s' % env["stagedir"], 120 '', env.MessageAction) 121 env.QInstall("$stagedir/asap", [so, pymods] ) 122 env.QInstall("$stagedir/bin", ["bin/asap", "bin/asap_update_data"]) 123 env.QInstall("$stagedir/install", ["bin/install"]) 124 env.QInstall("$stagedir/data", "share/ipythonrc-asap") 125 if os.path.exists("/nfs/aips++/data"): 126 rootdir = "/nfs/aips++/data" 127 sources = ['ephemerides','geodetic'] 128 outdir = os.path.join(env["stagedir"],'asap','data') 129 ofiles, ifiles = env.WalkDirTree(outdir, rootdir, sources) 130 env.QInstallAs(ofiles, ifiles) 131 arch = env.Archiver(os.path.join("dist",env["stagedir"]), 132 env["stagedir"]) 133 env.AddPostAction(arch, Delete("$stagedir")) 134
Note:
See TracChangeset
for help on using the changeset viewer.