Changeset 1195
- Timestamp:
- 08/29/06 09:47:08 (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r1187 r1195 26 26 ["release","debug"], ignorecase=1), 27 27 ("makedist", 28 "Make a binary distributiongiving a suffix, e.g. sarge or fc5",28 "Make a binary archive giving a suffix, e.g. sarge or fc5", 29 29 "") 30 30 ) … … 93 93 # build library 94 94 so = env.SConscript("src/SConscript", build_dir="build", duplicate=0) 95 # test module import, to see if there are unresolved symbols 96 def test_module(target,source,env): 97 pth = str(target[0]) 98 mod = os.path.splitext(pth)[0] 99 sys.path.insert(2, os.path.split(mod)[0]) 100 __import__(os.path.split(mod)[1]) 101 print "ok" 102 return 0 103 def test_str(target, source, env): 104 return "Testing module..." 105 106 taction = Action(test_module, test_str) 107 env.AddPostAction(so, taction) 95 108 96 109 # install targets … … 108 121 rootdir = "/nfs/aips++/data" 109 122 elif os.path.exists("data"): 110 rootdir = " data"123 rootdir = "./data" 111 124 if rootdir is not None: 112 125 ofiles, ifiles = env.WalkDirTree(outdir, rootdir, sources) … … 119 132 env.Command('Staging distribution for archive in %s' % env["stagedir"], 120 133 '', env.MessageAction) 121 env.QInstall("$stagedir/asap", [so, env.SGlob("python/*.py")] )134 st0 = env.QInstall("$stagedir/asap", [so, env.SGlob("python/*.py")] ) 122 135 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']136 env.QInstall("$stagedir", ["bin/install"]) 137 env.QInstall("$stagedir/asap/data", "share/ipythonrc-asap") 138 if rootdir is not None: 139 env.Command("Using data tables in %s" % rootdir, 140 '', env.MessageAction) 128 141 outdir = os.path.join(env["stagedir"],'asap','data') 129 142 ofiles, ifiles = env.WalkDirTree(outdir, rootdir, sources) 130 143 env.QInstallAs(ofiles, ifiles) 144 else: 145 env.Command("No data tables available. Use 'asap_update_data' after install", 146 '', env.MessageAction) 131 147 arch = env.Archiver(os.path.join("dist",env["stagedir"]), 132 148 env["stagedir"]) 133 149 env.AddPostAction(arch, Delete("$stagedir")) 134 150 151 if env.GetOption("clean"): 152 Execute(Delete(".sconf_temp")) -
trunk/bin/install
r1181 r1195 14 14 """ 15 15 16 def get_libs(lddcommand='/usr/bin/ldd', lib='_asap.so'): 16 def get_libs(lib='_asap.so'): 17 lddcommand = "/usr/bin/ldd" 18 lddopts = "" 19 if (sys.platform == "darwin"): 20 lddcommand = "otool" 21 lddopts = "-L" 17 22 if not os.path.isfile(lddcommand): 18 raise IOError("ldd not available")23 raise IOError("ldd/otool is not available") 19 24 if not os.path.exists(lib): 20 25 raise IOError("File %s not found" %lib) 21 p = os.popen(lddcommand+" "+l ib)26 p = os.popen(lddcommand+" "+lddopts+" "+lib) 22 27 resolved = [] 23 28 unresolved = [] … … 115 120 shutil.copy2("bin/asap", bindir) 116 121 shutil.copy2("bin/asap_update_data", bindir) 117 shutil.copytree("data", os.path.join(moddir,"data")) 122 if not os.path.exists("asap/data/ephemerides"): 123 print "Warning - no data directory present" 124 print "Please run asap_update_data after the installation is completed." 118 125 print "Installation completed." 119 126 except OSError, oe:
Note:
See TracChangeset
for help on using the changeset viewer.