Source: wheel
Version: 0.24.0-3
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps toolchain
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

Thanks for applying #776026. We now have a more generic /
package-agnostic solution for exposing a build timestamp, namely
SOURCE_DATE_EPOCH.

It works the same, just a different name. More importantly, because our
toolchain exports SOURCE_DATE_EPOCH, individual packages using wheel
will not require separate and somewhat tedious patching to use
WHEEL_FORCE_TIMESTAMP.

Patch attached.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/debian/patches/reproducible-whls.diff 
b/debian/patches/reproducible-whls.diff
index 18c0372..04b8bf8 100644
--- a/debian/patches/reproducible-whls.diff
+++ b/debian/patches/reproducible-whls.diff
@@ -26,7 +26,7 @@ Author: Barry Warsaw <ba...@debian.org>
 +    # Some applications need reproducible .whl files, but they can't do this
 +    # without forcing the timestamp of the individual ZipInfo objects.  See
 +    # issue #143.
-+    timestamp = os.environ.get('WHEEL_FORCE_TIMESTAMP')
++    timestamp = os.environ.get('SOURCE_DATE_EPOCH')
 +    if timestamp is None:
 +        date_time = None
 +    else:
@@ -164,7 +164,7 @@ Author: Barry Warsaw <ba...@debian.org>
 +                fp.write(filename + '\n')
 +        zip_base_name = os.path.join(tempdir, 'dummy')
 +        # The earliest date representable in TarInfos, 1980-01-01
-+        with environ('WHEEL_FORCE_TIMESTAMP', '315576060'):
++        with environ('SOURCE_DATE_EPOCH', '315576060'):
 +            zip_filename = wheel.archive.make_wheelfile_inner(
 +                zip_base_name, tempdir)
 +        with readable_zipfile(zip_filename) as zf:
diff --git a/debian/tests/reproduce-2 b/debian/tests/reproduce-2
index ea481c7..01614f6 100644
--- a/debian/tests/reproduce-2
+++ b/debian/tests/reproduce-2
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # For reproducible .whl files.  See bug ##776026.
-export WHEEL_FORCE_TIMESTAMP=315576060
+export SOURCE_DATE_EPOCH=315576060
 
 # Change to the directory with the setup.py.
 cd debian/tests/dummy
diff --git a/debian/tests/reproduce-3 b/debian/tests/reproduce-3
index 0efad13..fd260d8 100644
--- a/debian/tests/reproduce-3
+++ b/debian/tests/reproduce-3
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # For reproducible .whl files.  See bug ##776026.
-export WHEEL_FORCE_TIMESTAMP=315576060
+export SOURCE_DATE_EPOCH=315576060
 
 # Change to the directory with the setup.py.
 cd debian/tests/dummy
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to