summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-27 12:09:12 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-27 12:09:12 -0800
commitd2deb420bc70369faa12785df2b5dd4d390e523d (patch)
tree465d54ac5883613532a6c72caac91653e793164c /tests
parent91bf70231aae8eddaccd5a6f5b0833712c471cb3 (diff)
Fix archive script to set timestamps properly for .tar.gzv1.8.1
By default they are set to Jan 1 1970 which breaks homebrew. Fixes #124.
Diffstat (limited to 'tests')
-rw-r--r--tests/archive.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/archive.py b/tests/archive.py
index a0967fc..ac62dc2 100644
--- a/tests/archive.py
+++ b/tests/archive.py
@@ -1,6 +1,7 @@
import os.path
import sys
import tarfile
+import time
import zipfile
import StringIO
@@ -29,6 +30,7 @@ def write_tar(target, arcprefix, sources, compression):
path = os.path.join(arcprefix, source)
info = tarfile.TarInfo(path)
info.size = len(data)
+ info.mtime = time.time()
archive.addfile(info, StringIO.StringIO(data))
if len(sys.argv) < 4:
@@ -43,4 +45,4 @@ if target.endswith('.zip'):
elif target.endswith('.tar.gz') or target.endswith('.tar.bz2'):
write_tar(target, arcprefix, sources, compression = os.path.splitext(target)[1][1:])
else:
- raise NotImplementedError('File type not supported: ' + target) \ No newline at end of file
+ raise NotImplementedError('File type not supported: ' + target)