Files
Joshua Root 988423f7ca py-bootstrap-modules: add setuptools_scm and deps
Needed to break circular dependency between setuptools_scm and
importlib_metadata.

Also update other modules.
2022-07-27 12:02:09 +10:00

25 lines
955 B
Diff

Don't error out on file timestamps older than what zip supports.
https://trac.macports.org/ticket/63926
--- flit_core/wheel.py.orig 2022-02-22 06:04:37.000000000 +1100
+++ flit_core/wheel.py 2022-07-27 11:35:18.000000000 +1000
@@ -8,6 +8,7 @@
import os
import os.path as osp
import stat
+import sys
import tempfile
from pathlib import Path
from types import SimpleNamespace
@@ -108,7 +109,10 @@
rel_path = rel_path.replace(os.sep, '/')
if self.source_time_stamp is None:
- zinfo = zipfile.ZipInfo.from_file(full_path, rel_path)
+ if sys.version_info[:2] >= (3, 8):
+ zinfo = zipfile.ZipInfo.from_file(full_path, rel_path, strict_timestamps=False)
+ else:
+ zinfo = zipfile.ZipInfo.from_file(full_path, rel_path)
else:
# Set timestamps in zipfile for reproducible build
zinfo = zipfile.ZipInfo(rel_path, self.source_time_stamp)