Esempio n. 1
0
 def assemble(self):
     print "building PYZ", os.path.basename(self.out)
     pyz = archive.ZlibArchive(level=self.level, crypt=self.crypt)
     toc = self.toc - config['PYZ_dependencies']
     pyz.build(self.name, toc)
     _save_data(self.out, (self.name, self.level, self.crypt, self.toc))
     return 1
Esempio n. 2
0
 def assemble(self):
     print "building PYZ", os.path.basename(self.out)
     pyz = archive.ZlibArchive(level=self.level)
     toc = self.toc - config['PYZ_dependencies']
     for (nm, fnm, typ) in toc:
         if mtime(fnm[:-1]) > mtime(fnm):
             py_compile.compile(fnm[:-1])
     pyz.build(self.name, toc)
     outf = open(self.out, 'w')
     pprint.pprint((self.name, self.level, self.toc), outf)
     outf.close()
     return 1
Esempio n. 3
0
 def __init__(self, path, target_platform=None):
     import archive
     self.pyz = archive.ZlibArchive(path)
     Owner.__init__(self, path, target_platform)
 def __init__(self, path):
     import archive
     self.pyz = archive.ZlibArchive(path)
     Owner.__init__(self, path)
Esempio n. 5
0
 def assemble(self):
     contents = self.toc.toList()
     if contents:
         lib = archive.ZlibArchive()
         lib.build(self.name, archivebuilder.GetCompiled(self.toc.toList()))