示例#1
0
def relname(fname):  # c:\ProteoWizard\pwiz\foo\bar\baz
    if ac.contains_pwizroot(fname):
        return ac.replace_pwizroot(fname,
                                   relroot)  # $(ProjectDir)\..\foo\bar\baz
    if fname.startswith("\\"):
        return relroot + fname
    return relroot + "\\" + fname
示例#2
0
def relname(fname) : # c:\ProteoWizard\pwiz\foo\bar\baz
	if ac.contains_pwizroot(fname) :
		return ac.replace_pwizroot(fname,relroot) # $(ProjectDir)\..\foo\bar\baz
	if fname.startswith("\\") :
		return relroot+fname
	return relroot+"\\"+fname
示例#3
0
print "creating MSVC source build distribution kit %s"%(fz)
z = zipfile.ZipFile(fz,"w",zipfile.ZIP_DEFLATED)
exts = ["h","hpp","c","cpp","cxx","sln","vcproj.user","vcxproj.user","vcproj","vcxproj","txt","inl"]
# include the whole boost_aux tree
for shipdir in shipdirs :
	if "boost_aux" in shipdir :
		addShipDir(shipdir,addTree=True)
		break
for d in ["pwiz_aux"] : # any others not mentioned?
	addShipDir(ac.get_pwizroot()+"\\"+d,addTree=True)
for shipdir in shipdirs :
	for file in os.listdir(shipdir) :
		f = shipdir+"\\"+file
		ext = file.partition(".")[2]
		if (not stat.S_ISDIR(os.stat(f).st_mode)) and ext in exts or ext=="":
			tname = ac.replace_pwizroot(f,"pwiz")
			if not tname in files_not_to_be_shipped :
				print 'adding %s as %s'%(f,tname)
				z.write(f,tname)
			
testfiles = set()
for test in testargs : # grab data files
	f = absname(testargs[test])
	if (os.path.exists(f)) :
		ext = f.rpartition(".")[2]
		d = os.path.dirname(f) # go ahead and grab anything else with same .ext
		for file in os.listdir(d) :
			ff = d+"\\"+file
			ext2 = ff.rpartition(".")[2]
			if (ext==ext2 and not stat.S_ISDIR(os.stat(ff).st_mode)):
				testfiles.add(ff)
示例#4
0
		addShipDir(ac.get_pwizroot()+"/"+d,addTree=True)

	fz = args[3]
	print ("creating autotools source build distribution kit %s"%(fz))
	fztmp = fz.replace("tgz","tar")
	z = tarfile.open(fztmp,"w") # do the gzip as a final step
	exts = ["h","hpp","c","cpp","cxx","am","inl",""]

	unwanted = ["pwiz/BUILDING"]  # misleading docs for the bjam build

	for shipdir in shipdirs :
		for file in os.listdir(shipdir) :
			f = shipdir+"/"+file
			ext = file.partition(".")[2]
			if (os.path.exists(f) and (not os.path.isdir(f)) and (ext in exts) and ac.isNotForbidden(f)) :
				tarname = ac.replace_pwizroot(f,"pwiz")
				if (not tarname in unwanted) :
					if dbug :
						print ("add "+f+" as "+tarname)
					z.add(f,tarname)

	# make sure doctest.h etc get shipped
	for inc in ac.explicitIncludes: 
		f = ac.get_pwizroot()+"/"+inc
		if (os.path.exists(f)) :
			tarname = ac.replace_pwizroot(f,"pwiz")
			if dbug :
				print ("add "+f+" as "+tarname)
			z.add(f,tarname)
					
	for file in os.listdir(logdir) : # assume we also did the autoconf stuff in this dir
示例#5
0
		addShipDir(ac.get_pwizroot()+"/"+d,addTree=True)

	fz = args[3]
	print ("creating autotools source build distribution kit %s"%(fz))
	fztmp = fz.replace("tgz","tar")
	z = tarfile.open(fztmp,"w") # do the gzip as a final step
	exts = ["h","hpp","c","cpp","cxx","am","inl",""]

	unwanted = ["pwiz/BUILDING"]  # misleading docs for the bjam build

	for shipdir in shipdirs :
		for file in os.listdir(shipdir) :
			f = shipdir+"/"+file
			ext = file.partition(".")[2]
			if (os.path.exists(f) and (not os.path.isdir(f)) and (ext in exts) and ac.isNotForbidden(f)) :
				tarname = ac.replace_pwizroot(f,"pwiz")
				if (not tarname in unwanted) :
					if dbug :
						print ("add "+f+" as "+tarname)
					z.add(f,tarname)
	for file in os.listdir(logdir) : # assume we also did the autoconf stuff in this dir
		f = logdir+"/"+file
		ext = file.partition(".")[2]
		if (os.path.exists(f) and (not os.path.isdir(f)) and (not "build.log" in f)) :
			tarname = f.replace(logdir,"pwiz/autotools")
			if ("pwiz/autotools/BUILDING" == tarname) :
				# we need this in the root, actually
				tarname = "pwiz/BUILDING"
			if dbug :
				print ("add "+f+" as "+tarname)
			z.add(f,tarname)
示例#6
0
            addShipDir(shipdir, addTree=True)
            break
for d in ac.subtleIncludes:  # any others not mentioned?
    addShipDir(ac.get_pwizroot() + "\\" + d, addTree=True)
if (dbug):
    print('processing directories:')
    print(shipdirs)

for shipdir in shipdirs:
    if (dbug):
        print('processing directory %s' % shipdir)
    for file in os.listdir(shipdir):
        f = shipdir + "\\" + file
        ext = file.partition(".")[2]
        if (not stat.S_ISDIR(os.stat(f).st_mode)) and ext in exts or ext == "":
            tname = ac.replace_pwizroot(f, "pwiz")
            if not tname in files_not_to_be_shipped:
                print('adding %s as %s' % (f, tname))
                if tname not in addedFiles:
                    z.write(f, tname)
                    addedFiles.add(tname)

testfiles = set()
for test in testargs:  # grab data files
    f = absname(testargs[test])
    if (os.path.exists(f)):
        ext = f.rpartition(".")[2]
        d = os.path.dirname(
            f)  # go ahead and grab anything else with same .ext
        for file in os.listdir(d):
            ff = d + "\\" + file