@@ -227,6 +227,7 @@ def __init__(
227
227
python_tag ,
228
228
abi ,
229
229
platform ,
230
+ compress ,
230
231
outfile = None ,
231
232
strip_path_prefixes = None ,
232
233
):
@@ -238,6 +239,7 @@ def __init__(
238
239
self ._platform = platform
239
240
self ._outfile = outfile
240
241
self ._strip_path_prefixes = strip_path_prefixes
242
+ self ._compress = compress
241
243
self ._wheelname_fragment_distribution_name = escape_filename_distribution_name (
242
244
self ._name
243
245
)
@@ -254,6 +256,7 @@ def __enter__(self):
254
256
mode = "w" ,
255
257
distribution_prefix = self ._distribution_prefix ,
256
258
strip_path_prefixes = self ._strip_path_prefixes ,
259
+ compression = zipfile .ZIP_DEFLATED if self ._compress else zipfile .ZIP_STORED ,
257
260
)
258
261
return self
259
262
@@ -388,6 +391,11 @@ def parse_args() -> argparse.Namespace:
388
391
output_group .add_argument (
389
392
"--out" , type = str , default = None , help = "Override name of ouptut file"
390
393
)
394
+ output_group .add_argument (
395
+ "--no_compress" ,
396
+ action = "store_true" ,
397
+ help = "Disable compression of the final archive" ,
398
+ )
391
399
output_group .add_argument (
392
400
"--name_file" ,
393
401
type = Path ,
@@ -516,6 +524,7 @@ def main() -> None:
516
524
platform = arguments .platform ,
517
525
outfile = arguments .out ,
518
526
strip_path_prefixes = strip_prefixes ,
527
+ compress = not arguments .no_compress ,
519
528
) as maker :
520
529
for package_filename , real_filename in all_files :
521
530
maker .add_file (package_filename , real_filename )
0 commit comments