def addShipDir(d, addTree=False): if not ".svn" in d: shipdirs.add(os.path.abspath(d.replace(relroot, ac.get_pwizroot()))) if addTree: for dd in os.listdir(d): ddd = d + "\\" + dd if stat.S_ISDIR(os.stat(ddd).st_mode): addShipDir(ddd, addTree)
def addShipDir(d,addTree=False) : if not ".svn" in d : shipdirs.add(os.path.abspath(d.replace(relroot,ac.get_pwizroot()))) if addTree: for dd in os.listdir(d) : ddd = d+"\\"+dd if stat.S_ISDIR(os.stat(ddd).st_mode) : addShipDir(ddd,addTree)
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)
def addShipDir(in_d,addTree=False) : if not ".svn" in in_d : if dbug : print ("addShipDir "+in_d) if not os.path.exists(in_d) : d = ac.get_pwizroot() + "/" + in_d if not os.path.exists(d) : if dbug : print ("addShipDir skipping nonexistent path %s"%in_d) return in_d = d; d = os.path.abspath(in_d) shipdirs.add(d) if addTree: for dd in os.listdir(d) : ddd = d+"/"+dd if stat.S_ISDIR(os.stat(ddd).st_mode) : addShipDir(ddd,addTree)
def absname(infname) : fname = infname.replace("$(ProjectDir)..",ac.get_pwizroot()) if ac.contains_pwizroot(fname) : return fname else : return "%s\\%s"%(ac.get_pwizroot(),fname)
msvc_versions = range(10,7,-1) # build 10,9,8 buildlog_lines = [] if (len(args) >= 3) : buildlog = args[2] print "using build log %s\n"%buildlog buildlog_lines = open(buildlog).readlines() if (len(args) >= 4) : v = int(args[3]) msvc_versions = range(v,v+1) else : # no build log provided, go make one print "performing clean: clean.bat\n" here = os.getcwd() os.chdir(ac.get_pwizroot()) os.system("clean.bat") buildcmd="quickbuild.bat --without-binary-msdata -d+2" print "performing build: %s\n"%buildcmd p=subprocess.Popen(buildcmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE) outs, errors = p.communicate() buildlog_lines = outs.split("\r\n") print errors os.chdir(here) srcs=set() testhelpers=set() testargs=dict() libnames=set() projects=set() includes=set([".","$(ProjectDir)..","$(BOOST_ROOT)","$(ZLIB_SOURCE)."])
def relname(fname) : # /mnt/hgfs/ProteoWizard/pwiz/foo/bar/baz return fname.replace(ac.get_pwizroot(),".") # ./foo/bar/baz
print (line) if ("g++" in line or "gcc" in line) and " -c " in line and '.o" "' in line: line = line.replace("\\","/") # in case its mingw gcc 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
print (line) if ("g++" in line or "gcc" in line) and " -c " in line and '.o" "' in line: line = line.replace("\\","/") # in case its mingw gcc 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()) :
def absname(infname): fname = infname.replace("$(ProjectDir)..", ac.get_pwizroot()) if ac.contains_pwizroot(fname): return fname else: return "%s\\%s" % (ac.get_pwizroot(), fname)
msvc_versions = [12, 10, 9, 8] # build files for MSVC12,10,9,8 buildlog_lines = [] if (len(args) >= 3): buildlog = args[2] print("using build log %s\n" % buildlog) buildlog_lines = open(buildlog).readlines() if (len(args) >= 4): v = int(args[3]) msvc_versions = range(v, v + 1) else: # no build log provided, go make one print("performing clean: clean.bat\n") here = os.getcwd() os.chdir(ac.get_pwizroot()) os.system("clean.bat") buildcmd = "quickbuild.bat --without-binary-msdata -d+2" print("performing build: %s\n" % buildcmd) p = subprocess.Popen(buildcmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) outs, errors = p.communicate() buildlog_lines = outs.split("\r\n") print(errors) os.chdir(here) srcs = set() testhelpers = set() testargs = dict() libnames = set()
print line if ("g++" in line or "gcc" in line) and " -c " in line and '.o" "' in line: line = line.replace("\\","/") # in case its mingw gcc 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] 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: