Bug#886522: python-stdnum: please make the build reproducible
Chris Lamb
lamby at debian.org
Sun Jan 7 08:44:35 UTC 2018
Source: python-stdnum
Version: 1.8.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that python-stdnum could not be built reproducibly as it relies
on a stable set ordering when generating the documentation.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch 2018-01-07 08:42:33.299550983 +0000
@@ -0,0 +1,33 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-01-07
+
+--- python-stdnum-1.8.1.orig/stdnum/eu/vat.py
++++ python-stdnum-1.8.1/stdnum/eu/vat.py
+@@ -43,7 +43,7 @@ from stdnum.exceptions import *
+ from stdnum.util import clean, get_cc_module, get_soap_client
+
+
+-country_codes = set([
++_country_codes = set([
+ 'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gb',
+ 'gr', 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt',
+ 'ro', 'se', 'si', 'sk',
+@@ -63,7 +63,7 @@ def _get_cc_module(cc):
+ cc = cc.lower()
+ if cc == 'el':
+ cc = 'gr'
+- if cc not in country_codes:
++ if cc not in _country_codes:
+ return
+ if cc not in _country_modules:
+ _country_modules[cc] = get_cc_module(cc, 'vat')
+@@ -105,7 +105,7 @@ def guess_country(number):
+ for which it is valid. This returns lower case codes and returns gr (not
+ el) for Greece."""
+ return [cc
+- for cc in country_codes
++ for cc in _country_codes
+ if _get_cc_module(cc).is_valid(number)]
+
+
--- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series 2018-01-07 08:36:37.193679324 +0000
@@ -0,0 +1 @@
+reproducible-build.patch
More information about the Reproducible-bugs
mailing list