Commit 6fe7f54a by Chris Cosby Committed by Sébastien Eustace

Compress all wheel content with explicit ZIP_DEFLATED (#715) (#838)

https://docs.python.org/2/library/zipfile.html#zipfile.ZipFile.writestr

Note: When passing a ZipInfo instance as the zinfo_or_arcname parameter,
the compression method used will be that specified in the compress_type
member of the given ZipInfo instance. By default, the ZipInfo
constructor sets this member to ZIP_STORED.
parent 4f215278
...@@ -259,7 +259,7 @@ class WheelBuilder(Builder): ...@@ -259,7 +259,7 @@ class WheelBuilder(Builder):
hashsum.update(buf) hashsum.update(buf)
src.seek(0) src.seek(0)
wheel.writestr(zinfo, src.read()) wheel.writestr(zinfo, src.read(), compress_type=zipfile.ZIP_DEFLATED)
size = os.stat(full_path).st_size size = os.stat(full_path).st_size
hash_digest = urlsafe_b64encode(hashsum.digest()).decode("ascii").rstrip("=") hash_digest = urlsafe_b64encode(hashsum.digest()).decode("ascii").rstrip("=")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment