From: Cheng Zhao Date: Sat, 26 Oct 2013 09:42:12 +0000 (+0800) Subject: Do "compress" the archive when creating zip. X-Git-Tag: v0.6.5~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=cb31140d3a7f44738fa1851890706dc7b2f1085e;p=electron.git Do "compress" the archive when creating zip. By default the zipfile module doesn't do the compression unless we explictly specify the method. --- diff --git a/script/lib/util.py b/script/lib/util.py index af714686..7c890bf8 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -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: