Do "compress" the archive when creating zip.

By default the zipfile module doesn't do the compression unless we
explictly specify the method.
This commit is contained in:
Cheng Zhao 2013-10-26 17:42:12 +08:00
parent f2c1d8f4b2
commit cb31140d3a

View file

@ -70,7 +70,7 @@ def make_zip(zip_file_path, files, dirs):
files += dirs
subprocess.check_call(['zip', '-r', '-y', zip_file_path] + files)
else:
zip_file = zipfile.ZipFile(zip_file_path, "w")
zip_file = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED)
for filename in files:
zip_file.write(filename, filename)
for dirname in dirs: