[pysal] 01/02: Add patch by Chris Lamb for reproducible builds. (closes: #832997)

Bas Couwenberg sebastic at debian.org
Sat Jul 30 17:24:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository pysal.

commit e4807a85474493f17bba3270cb026f3311a68adc
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jul 30 19:08:13 2016 +0200

    Add patch by Chris Lamb for reproducible builds.
    (closes: #832997)
---
 debian/changelog                                   |  8 ++++++
 debian/patches/reproducible-build-and-output.patch | 29 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 38 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3ac780e..70e5a7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pysal (1.11.2-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add patch by Chris Lamb for reproducible builds.
+    (closes: #832997)
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 30 Jul 2016 19:07:45 +0200
+
 pysal (1.11.2-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/reproducible-build-and-output.patch b/debian/patches/reproducible-build-and-output.patch
new file mode 100644
index 0000000..e7612de
--- /dev/null
+++ b/debian/patches/reproducible-build-and-output.patch
@@ -0,0 +1,29 @@
+Description: Make the output and build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Forwarded: https://github.com/pysal/pysal/pull/856
+
+--- a/pysal/core/IOHandlers/pyDbfIO.py
++++ b/pysal/core/IOHandlers/pyDbfIO.py
+@@ -4,6 +4,8 @@ import struct
+ import itertools
+ from warnings import warn
+ import pysal
++import os
++import time
+ 
+ __author__ = "Charles R Schmidt <schmidtc at gmail.com>"
+ __all__ = ['DBF']
+@@ -272,7 +274,12 @@ class DBF(pysal.core.Tables.DataTable):
+         POS = self.f.tell()
+         self.f.seek(0)
+         ver = 3
+-        now = datetime.datetime.now()
++        if 'SOURCE_DATE_EPOCH' in os.environ:
++            now = datetime.datetime.utcfromtimestamp(
++                int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
++            )
++        else:
++            now = datetime.datetime.now()
+         yr, mon, day = now.year - 1900, now.month, now.day
+         numrec = self.numrec
+         numfields = len(self.header)
diff --git a/debian/patches/series b/debian/patches/series
index 347d63d..2c793e3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 unusual-interpreter.patch
+reproducible-build-and-output.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pysal.git



More information about the Pkg-grass-devel mailing list