Source: lexicon Version: 2.2.1-1 Severity: wishlist Tags: patch User: [email protected] Usertags: fileordering X-Debbugs-Cc: [email protected]
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that lexicon could not be built reproducibly as it includes non- determinstic output in its PKG-INFO file due to iterating over the filesystem and using that sorting to generate the "Keywords" variable. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2018-03-31 10:31:12.136952930 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <[email protected]> +Last-Update: 2018-03-31 + +--- lexicon-2.2.1.orig/setup.py ++++ lexicon-2.2.1/setup.py +@@ -24,7 +24,7 @@ with open(path.join(here, 'README.md'), + # Get a list of all the providers + current_filepath = path.join(here, 'lexicon', 'providers') + providers = [path.splitext(f)[0] for f in listdir(current_filepath) if path.isfile(path.join(current_filepath, f))] +-providers = list(set(providers)) ++providers = list(sorted(set(providers))) + providers.remove('base') + providers.remove('__init__') + --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2018-03-31 10:31:10.628945251 +0100 @@ -0,0 +1 @@ +reproducible-build.patch

