def addFile(file) : if ac.isNotForbidden(file) : addShipDir(os.path.dirname(file)) if ("/pwiz/libraries/libsvm" in file): if ("libsvm" in file): srcs.add(file) includes.add(relname(file.rpartition("/")[0])) elif ac.isExampleFile(file) : if ("/pwiz_tools/examples/" in file) : # need a full path examples.add(file) else : examples.add(file.replace("pwiz_tools/examples/","%s/pwiz_tools/examples/"%ac.get_pwizroot())) elif isTestFile(file) : tests.add(file) else : srcs.add(file)
if dbug : print line if ("ProteoWizard " in line and "last committed" in line) : buildversion = line.split(" ")[1].replace(".","_") if ("file " in line and "obj.rsp" in line) : # beginning of a repsonse file in_rsp = True elif ("call " in line) : # end of a response file in_rsp = False elif in_rsp : if ("-I" in line and ac.isWelcomeInclude(line)): ipath = relname(line.rpartition('-I')[2].replace('"','')) includes.add(ipath) addShipDir(ipath) if "libraries\\zlib" in line : zlibPath = ipath if ((".cpp" in line or ".cxx" in line) and ac.isWelcomeSrcDir(line) and ac.isNotForbidden(line)) : file = absname(line.replace('"','')) if ac.isSrcFile(file) or ac.isExampleFile(file): addFile(file) elif ".test\\" in line and '.exe" ' in line and "2>&1" in line : # running a test import shlex test = shlex.split(line.partition(" > ")[0]) head = test[0].replace('"','').partition(".test")[0].rpartition("\\")[0] tail = test[0].replace('"','').rpartition("\\")[2] cmd = makeProjectName(head+"\\"+tail) args = "" for t in range(1,len(test)): args = args + relname(test[t]) if (t < len(test)-1) : args += " " testargs[cmd]=args
file = (line.rpartition(".o\" \"")[2]).rpartition("\"")[0] if ac.isSrcFile(file) or ac.isExampleFile(file): addFile(file) if ".archive" in line : if "\\" in line: libname = line.rpartition("\\")[2] else : libname = line.rpartition("/")[2] libnames.add(libname.rpartition(".")[0]) iseek = line # # locate any explicit includes pwizinc = ' -I"%s/pwiz'%ac.get_pwizroot() while (pwizinc in iseek) : incl = iseek.rpartition(pwizinc)[2] if ac.isNotForbidden(incl) : includes.add("pwiz"+incl.partition('"')[0]) iseek = iseek.rpartition(pwizinc)[0] if ("libraries/boost_aux" in line) : # forward looking boostiness includes.add("libraries/boost_aux") if ("libraries/Eigen" in line) : # make sure we ship Eigen and include it includes.add("libraries/Eigen") if ("libraries/CSpline" in line) : # make sure we ship CSpline and include it includes.add("libraries/CSpline") #print tests #print srcs # print libnames #print includes # nab the version info from the generated version.cpp file version=[]
file = (line.rpartition(".o\" \"")[2]).rpartition("\"")[0] if ac.isSrcFile(file) or ac.isExampleFile(file): addFile(file) if ".archive" in line : if "\\" in line: libname = line.rpartition("\\")[2] else : libname = line.rpartition("/")[2] libnames.add(libname.rpartition(".")[0]) iseek = line # # locate any explicit includes pwizinc = ' -I"%s/pwiz'%ac.get_pwizroot() while (pwizinc in iseek) : incl = iseek.rpartition(pwizinc)[2] if ac.isNotForbidden(incl) : includes.add("pwiz"+incl.partition('"')[0]) iseek = iseek.rpartition(pwizinc)[0] if ("libraries/boost_aux" in line) : # forward looking boostiness includes.add("libraries/boost_aux") #print tests #print srcs # print libnames #print includes # nab the version info from the generated version.cpp file version=[] for line in open ("%s/pwiz/Version.cpp"%ac.get_pwizroot()) : if "{return" in line: version.append((line.rpartition("{return ")[2]).rpartition(";")[0])
in_rsp = True elif ("call " in line): # end of a response file in_rsp = False elif in_rsp: if dbug: print("consider line " + line) if ("-I" in line and ac.isWelcomeInclude(line)): ipath = relname(line.rpartition('-I')[2].replace('"', '')) includes.add(ipath) addShipDir(ipath) if "libraries\\zlib" in line: zlibPath = ipath if (".cpp" in line or ".cxx" in line): if ("-F" in line): # strip inlined compiler args if any line = line.split("-F")[0].strip() if (ac.isWelcomeSrcDir(line) and ac.isNotForbidden(line)): file = absname(line.replace('"', '')) if dbug: print("consider file " + file) if ac.isSrcFile(file) or ac.isExampleFile(file): addFile(file) elif ".test\\" in line and '.exe" ' in line and "2>&1" in line: # running a test import shlex test = shlex.split(line.partition(" > ")[0]) head = test[0].replace('"', '').partition(".test")[0].rpartition("\\")[0] tail = test[0].replace('"', '').rpartition("\\")[2] cmd = makeProjectName(head + "\\" + tail) args = "" for t in range(1, len(test)): args = args + relname(test[t])
in_rsp = True elif ("call " in line) : # end of a response file in_rsp = False elif in_rsp : if dbug: print ("consider line "+line) if ("-I" in line and ac.isWelcomeInclude(line)): ipath = relname(line.rpartition('-I')[2].replace('"','')) includes.add(ipath) addShipDir(ipath) if "libraries\\zlib" in line : zlibPath = ipath if (".cpp" in line or ".cxx" in line) : if ("-F" in line) : # strip inlined compiler args if any line = line.split("-F")[0].strip() if (ac.isWelcomeSrcDir(line) and ac.isNotForbidden(line)) : file = absname(line.replace('"','')) if dbug: print ("consider file "+file) if ac.isSrcFile(file) or ac.isExampleFile(file): addFile(file) elif ".test\\" in line and '.exe" ' in line and "2>&1" in line : # running a test import shlex test = shlex.split(line.partition(" > ")[0]) head = test[0].replace('"','').partition(".test")[0].rpartition("\\")[0] tail = test[0].replace('"','').rpartition("\\")[2] cmd = makeProjectName(head+"\\"+tail) args = "" for t in range(1,len(test)): args = args + relname(test[t]) if (t < len(test)-1) :
file = (line.rpartition(".o\" \"")[2]).rpartition("\"")[0] if ac.isSrcFile(file) or ac.isExampleFile(file): addFile(file) if ".archive" in line: if "\\" in line: libname = line.rpartition("\\")[2] else: libname = line.rpartition("/")[2] libnames.add(libname.rpartition(".")[0]) iseek = line # # locate any explicit includes pwizinc = ' -I"%s/pwiz' % ac.get_pwizroot() while (pwizinc in iseek): incl = iseek.rpartition(pwizinc)[2] if ac.isNotForbidden(incl): includes.add("pwiz" + incl.partition('"')[0]) iseek = iseek.rpartition(pwizinc)[0] if ("libraries/boost_aux" in line): # forward looking boostiness includes.add("libraries/boost_aux") #print tests #print srcs # print libnames #print includes # nab the version info from the generated version.cpp file version = [] for line in open("%s/pwiz/Version.cpp" % ac.get_pwizroot()): if "{return" in line: version.append((line.rpartition("{return ")[2]).rpartition(";")[0])