Source: python-attrs
Version: 16.0.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

Whilst working on the "reproducible builds" effort [0], we noticed
that python-attrs could not be built reproducibly.

Patch attached.

 [0] https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch   2016-08-09 22:36:26.233846957 
+0100
@@ -0,0 +1,25 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2016-08-09
+
+--- python-attrs-16.0.0.orig/docs/conf.py
++++ python-attrs-16.0.0/docs/conf.py
+@@ -16,6 +16,7 @@ import codecs
+ import datetime
+ import os
+ import re
++import time
+ 
+ try:
+     import sphinx_rtd_theme
+@@ -80,7 +81,9 @@ master_doc = 'index'
+ 
+ # General information about the project.
+ project = u'attrs'
+-year = datetime.date.today().year
++year = datetime.datetime.utcfromtimestamp(
++    int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
++).year
+ copyright = u'2015{0}, Hynek Schlawack'.format(
+     u'-{0}'.format(year) if year != 2015 else u""
+ )
--- a/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series     2016-08-09 22:36:25.197839248 +0100
@@ -0,0 +1 @@
+reproducible-build.patch
_______________________________________________
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