Skip to content

Commit

Permalink
Use deflate compression for zipfiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 14, 2024
1 parent c9022a6 commit e940397
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion whey/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import shutil
import sys
import tarfile
import zipfile
from abc import ABC, abstractmethod
from email.headerregistry import Address
from functools import partial
Expand Down Expand Up @@ -765,7 +766,8 @@ def create_wheel_archive(self) -> str:

record_filenames = sort_paths(*record_filenames, self.dist_info / "RECORD")

with handy_archives.ZipFile(wheel_filename, mode='w') as wheel_archive:
# Perhaps LZMA support in the future
with handy_archives.ZipFile(wheel_filename, mode='w', compression=zipfile.ZIP_DEFLATED) as wheel_archive:
with (self.dist_info / "RECORD").open('w') as fp:
for file in sort_paths(*non_record_filenames): # pylint: disable=loop-invariant-statement

Expand Down

0 comments on commit e940397

Please sign in to comment.