From ebf26a62384e7312823d36e6ac6245e8d5708cd4 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 22 Nov 2024 13:17:38 +0100 Subject: [PATCH] devops: make wheels smaller (use deflate zip compression) (#2662) --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b4576c6a1..b4212cb9d 100644 --- a/setup.py +++ b/setup.py @@ -148,7 +148,9 @@ def _build_wheel( extractall(zip, f"driver/{wheel_bundle['zip_name']}") wheel_location = without_platform + wheel_bundle["wheel"] shutil.copy(base_wheel_location, wheel_location) - with zipfile.ZipFile(wheel_location, "a") as zip: + with zipfile.ZipFile( + wheel_location, mode="a", compression=zipfile.ZIP_DEFLATED + ) as zip: driver_root = os.path.abspath(f"driver/{wheel_bundle['zip_name']}") for dir_path, _, files in os.walk(driver_root): for file in files: