Source: dh-python Version: 1.20141111-2 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: toolchain randomness X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi, While working on the "reproducible builds" effort [1], we have noticed that dh-python is generating files in /usr/share/python/ns/PACKAGE with a non-deterministic order. The attached patch removes this non-determinism from the build system. Once applied, packages using namespace packages can be built reproducibly in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/dh_python2 b/dh_python2 index d02b8ab..6124423 100755 --- a/dh_python2 +++ b/dh_python2 @@ -510,7 +510,7 @@ def main(): if not exists(dstdir): os.makedirs(dstdir) with open(join(dstdir, package), 'a', encoding='utf-8') as fp: - fp.writelines("%s\n" % i for i in nsp) + fp.writelines("%s\n" % i for i in sorted(nsp)) pyshared = join('debian', package, 'usr/share/pyshared/') if isdir(pyshared) and not os.listdir(pyshared):