- Timestamp:
- 08/24/06 11:45:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/install
r1173 r1181 13 13 [-h] this message 14 14 """ 15 16 def get_libs(lddcommand='/usr/bin/ldd', lib='_asap.so'): 17 if not os.path.isfile(lddcommand): 18 raise IOError("ldd not available") 19 if not os.path.exists(lib): 20 raise IOError("File %s not found" %lib) 21 p = os.popen(lddcommand+" "+lib) 22 resolved = [] 23 unresolved = [] 24 for l in p.readlines(): 25 lsp = l.split() 26 if lsp[2] == "not": 27 unresolved.append(lsp[0]) 28 else: 29 resolved.append(lsp[2]) 30 return resolved, unresolved 15 31 16 32 try: … … 47 63 moduledir = v 48 64 49 print 'Looking for dependent modules...' 65 print "Looking fo all required libraries..." 66 try: 67 libs, missing = get_libs(lib="asap/_asap.so") 68 if len(missing): 69 print " The following libraries are missing:" 70 print missing 71 sys.exit(1) 72 else: 73 print " All required libraries are present." 74 except IOError,msg: 75 print msg+" Skipping test." 76 77 print 'Looking for dependent python modules...' 50 78 try: 51 79 import matplotlib … … 75 103 sys.exit(1) 76 104 77 print " All required modules were found."105 print " All required modules were found." 78 106 moddir = os.path.join(moduledir, "asap") 79 107 bindir = os.path.join(execprefix, "bin") … … 84 112 print "Installing asap module in %s" % moddir 85 113 shutil.copytree("asap", moddir) 86 print "Installing asap startup scriptin %s" % bindir114 print "Installing asap scripts in %s" % bindir 87 115 shutil.copy2("bin/asap", bindir) 116 shutil.copy2("bin/asap_update_data", bindir) 88 117 shutil.copytree("data", os.path.join(moddir,"data")) 89 118 print "Installation completed."
Note:
See TracChangeset
for help on using the changeset viewer.