From 36038f8196e6abf8902900bc5cd5ce7144da3771 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 14 Apr 2018 06:45:35 +0200 Subject: [PATCH] Sort .hhp file list Without this change, the pgadmin3 openSUSE package differed for every build (happens in a disposable VM) because pgadmin3.hhp contained entries in indeterministic filesystem readdir order. See https://reproducible-builds.org/ for why this matters. --- sphinx/builders/htmlhelp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py index ac32a42db..8be51d50d 100644 --- a/sphinx/builders/htmlhelp.py +++ b/sphinx/builders/htmlhelp.py @@ -247,6 +247,8 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): outdir += os.sep olen = len(outdir) for root, dirs, files in os.walk(outdir): + dirs.sort() + files.sort() staticdir = root.startswith(path.join(outdir, '_static')) for fn in sorted(files): if (staticdir and not fn.endswith('.js')) or \