Skip to content

Commit

Permalink
devops: make wheels smaller (use deflate zip compression) (#2662)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Nov 22, 2024
1 parent f45782e commit ebf26a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ebf26a6

Please sign in to comment.