Source: python-stem
Version: 1.8.0-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0] we noticed that
python-stem could not be built reproducibly.
This is because a Python method signature included a default keyword
argument that varied on the absolute build path.
Patch attached. Note that we don't need to update the `_write` method
because the leading underscore means it will not end up in the
documentation.
[0] https://reproducible-builds.org/
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 2020-06-23 10:23:31.415054499
+0100
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-06-23
+
+--- python-stem-1.8.0.orig/stem/directory.py
++++ python-stem-1.8.0/stem/directory.py
+@@ -372,7 +372,9 @@ class Fallback(Directory):
+ self.header = OrderedDict(header) if header else OrderedDict()
+
+ @staticmethod
+- def from_cache(path = FALLBACK_CACHE_PATH):
++ def from_cache(path = None):
++ if path is None:
++ path = FALLBACK_CACHE_PATH
+ conf = stem.util.conf.Config()
+ conf.load(path)
+ headers = OrderedDict([(k.split('.', 1)[1], conf.get(k)) for k in
conf.keys() if k.startswith('header.')])
--- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series 2020-06-23 10:23:30.159057382 +0100
@@ -0,0 +1 @@
+reproducible-build.patch