Source: mwparserfromhell
Version: 0.4.2-1.1
Severity: wishlist
Tags: patch upstream
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that mwparserfromhell could not be built reproducibly.
It globs for source files without sorting them, so the objects are
linked in non-deterministic order.

The attached patch fixes that by sorting the list.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/setup.py b/setup.py
index 1bca436..7d06a47 100644
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,7 @@ if fallback:
 # Project-specific part begins here:
 
 tokenizer = Extension("mwparserfromhell.parser._tokenizer",
-                      sources=glob("mwparserfromhell/parser/ctokenizer/*.c"),
+                      sources=sorted(glob("mwparserfromhell/parser/ctokenizer/*.c")),
                       depends=glob("mwparserfromhell/parser/ctokenizer/*.h"))
 
 setup(

Attachment: signature.asc
Description: PGP signature

Reply via email to