File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 22
33import logging
44import shutil
5- import zipfile
65from pathlib import Path
76from tempfile import NamedTemporaryFile
87from zipfile import ZIP_DEFLATED , ZIP_STORED
@@ -71,15 +70,15 @@ def zip_dir(path: Path) -> None:
7170 def generate_nested_zip (self , inner_zip_path : Path ) -> None :
7271 logger .info (f"Generating nested-zip and __init__.py loader using entrypoint package '{ self .project .entrypoint_package_name } '..." )
7372
74- with zipfile . ZipFile (self .output_file , 'w' ) as outer_zip_file :
73+ with ZipFile (self .output_file , 'w' ) as outer_zip_file :
7574 entrypoint_dir = Path (self .project .entrypoint_package_name )
76- outer_zip_file .write (
75+ outer_zip_file .write_reproducibly (
7776 inner_zip_path ,
7877 arcname = str (entrypoint_dir / ".dependencies.zip" ),
79- compresslevel = zipfile . ZIP_STORED
78+ compresslevel = ZIP_STORED
8079 )
81- outer_zip_file .writestr (
80+ outer_zip_file .writestr_reproducibly (
8281 str (entrypoint_dir / "__init__.py" ),
8382 Path (__file__ ).parent .joinpath ("nested_zip_loader.py" ).read_text (),
84- compresslevel = zipfile . ZIP_DEFLATED
83+ compresslevel = ZIP_DEFLATED
8584 )
You can’t perform that action at this time.
0 commit comments