3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch

14 lines
665 B
Diff
Raw Normal View History

2017-06-07 04:35:29 +01:00
diff --git a/third-party/py/pex/pex/common.py b/third-party/py/pex/pex/common.py
2017-06-08 19:26:42 +01:00
index 76459ce23..eff411b20 100644
2017-06-07 04:35:29 +01:00
--- a/third-party/py/pex/pex/common.py
+++ b/third-party/py/pex/pex/common.py
2017-06-08 19:26:42 +01:00
@@ -328,4 +328,7 @@ class Chroot(object):
2017-06-07 04:35:29 +01:00
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)
2017-06-08 19:26:42 +01:00
+ path = os.path.join(self.chroot, f)
+ instant = 615532801
+ os.utime(path, (instant, instant))
+ zf.write(path, arcname=f, compress_type=zipfile.ZIP_DEFLATED)