summaryrefslogtreecommitdiff
path: root/sphinx/builders/htmlhelp.py
diff options
context:
space:
mode:
authorBernhard M. Wiedemann <bwiedemann@suse.de>2018-04-14 06:45:35 +0200
committerBernhard M. Wiedemann <bwiedemann@suse.de>2018-04-14 21:27:04 +0200
commit36038f8196e6abf8902900bc5cd5ce7144da3771 (patch)
treeb298d937100835a68086fa233dedbb7eb41fe8bf /sphinx/builders/htmlhelp.py
parentaa21d78e42ebbc993f4f5df66755a044a95d52c8 (diff)
downloadsphinx-git-36038f8196e6abf8902900bc5cd5ce7144da3771.tar.gz
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.
Diffstat (limited to 'sphinx/builders/htmlhelp.py')
-rw-r--r--sphinx/builders/htmlhelp.py2
1 files changed, 2 insertions, 0 deletions
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 \