depot/third_party/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

13 lines
665 B
Diff

diff --git a/third-party/py/pex/pex/common.py b/third-party/py/pex/pex/common.py
index 76459ce23..eff411b20 100644
--- a/third-party/py/pex/pex/common.py
+++ b/third-party/py/pex/pex/common.py
@@ -328,4 +328,7 @@ class Chroot(object):
def zip(self, filename, mode='wb'):
with contextlib.closing(zipfile.ZipFile(filename, mode)) as zf:
for f in sorted(self.files()):
- zf.write(os.path.join(self.chroot, f), arcname=f, compress_type=zipfile.ZIP_DEFLATED)
+ path = os.path.join(self.chroot, f)
+ instant = 615532801
+ os.utime(path, (instant, instant))
+ zf.write(path, arcname=f, compress_type=zipfile.ZIP_DEFLATED)