Set strict_timestamps=False when zip is called for isolated environment

This commit is contained in:
Nicholas Serra 2021-04-29 13:11:58 -04:00
parent 999b121402
commit 5822e39d24
No known key found for this signature in database
GPG Key ID: EEDDA4EE375C6D12
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ def _create_standalone_pip() -> Iterator[str]:
with TempDirectory(kind="standalone-pip") as tmp_dir:
pip_zip = os.path.join(tmp_dir.path, "__env_pip__.zip")
with zipfile.ZipFile(pip_zip, "w") as zf:
with zipfile.ZipFile(pip_zip, "w", strict_timestamps=False) as zf:
for child in source.rglob("*"):
zf.write(child, child.relative_to(source.parent).as_posix())
yield os.path.join(pip_zip, "pip")