From fdcdb63afdbbbf049c8f188e2ecae4836dd2ddff Mon Sep 17 00:00:00 2001 From: Eitan <49152796+eitanV81@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:46:48 +0300 Subject: [PATCH] support large wheel files in reproducible mode Update wheel.py to support reproducible for large zip files update file size for zinfo to recognize if zip64 is needed. --- backend/src/hatchling/builders/wheel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/hatchling/builders/wheel.py b/backend/src/hatchling/builders/wheel.py index 7ef38a1bf..e6bc55262 100644 --- a/backend/src/hatchling/builders/wheel.py +++ b/backend/src/hatchling/builders/wheel.py @@ -102,6 +102,8 @@ def add_file(self, included_file: IncludedFile) -> tuple[str, str, str]: set_zip_info_mode(zip_info, new_mode) if stat.S_ISDIR(file_stat.st_mode): # no cov zip_info.external_attr |= 0x10 + else: + zip_info.file_size = file_stat.st_size else: zip_info = zipfile.ZipInfo.from_file(included_file.path, relative_path)