sort file lists

similar to commit 0b7c73a98

filesystems return file lists in random order,
but we want to generate reproducible output.

See https://reproducible-builds.org/ for why this matters.
This commit is contained in:
Bernhard M. Wiedemann 2017-06-20 08:12:12 +02:00
parent 5806e6b9f2
commit 6663c45bb4
2 changed files with 2 additions and 2 deletions

View File

@ -246,7 +246,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
olen = len(outdir)
for root, dirs, files in os.walk(outdir):
staticdir = root.startswith(path.join(outdir, '_static'))
for fn in files:
for fn in sorted(files):
if (staticdir and not fn.endswith('.js')) or \
fn.endswith('.html'):
print(path.join(root, fn)[olen:].replace(os.sep, '\\'),

View File

@ -188,7 +188,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
for root, dirs, files in os.walk(outdir):
resourcedir = root.startswith(staticdir) or \
root.startswith(imagesdir)
for fn in files:
for fn in sorted(files):
if (resourcedir and not fn.endswith('.js')) or \
fn.endswith('.html'):
filename = path.join(root, fn)[olen:]