- def addJar(self, filename):
- with zipfile.ZipFile(filename) as zf:
- platform = None
- arch = None
- git_version = None
- for z in zf.infolist():
- path = filter(None, z.filename.split('/'))
- if len(path)==3 and path[0] == 'NATIVE':
- platform, arch = path[1:3]
- elif z.filename=='META-INF/MANIFEST.MF':
- zf.read('META-INF/MANIFEST.MF')
- git_version = re.findall(r"Implementation-Version: \"(.*?)\"", zf.read('META-INF/MANIFEST.MF'))
+ def __init__(self, filename='simgrid.jar'):
+ self.zipfile = zipfile.ZipFile(filename, 'w')
+ self.done = set()
+ self.git_version = None
+
+ def addJar(self, filename):
+ with zipfile.ZipFile(filename) as zf:
+ platform = None
+ arch = None
+ git_version = None
+ for z in zf.infolist():
+ path = filter(None, z.filename.split('/'))
+ if len(path) == 3 and path[0] == 'NATIVE':
+ platform, arch = path[1:3]
+ elif z.filename == 'META-INF/MANIFEST.MF':
+ zf.read('META-INF/MANIFEST.MF')
+ git_version = re.findall(
+ r"Implementation-Version: \"(.*?)\"", zf.read('META-INF/MANIFEST.MF'))