mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
parent
5806e6b9f2
commit
6663c45bb4
@ -246,7 +246,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
|
|||||||
olen = len(outdir)
|
olen = len(outdir)
|
||||||
for root, dirs, files in os.walk(outdir):
|
for root, dirs, files in os.walk(outdir):
|
||||||
staticdir = root.startswith(path.join(outdir, '_static'))
|
staticdir = root.startswith(path.join(outdir, '_static'))
|
||||||
for fn in files:
|
for fn in sorted(files):
|
||||||
if (staticdir and not fn.endswith('.js')) or \
|
if (staticdir and not fn.endswith('.js')) or \
|
||||||
fn.endswith('.html'):
|
fn.endswith('.html'):
|
||||||
print(path.join(root, fn)[olen:].replace(os.sep, '\\'),
|
print(path.join(root, fn)[olen:].replace(os.sep, '\\'),
|
||||||
|
@ -188,7 +188,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
|
|||||||
for root, dirs, files in os.walk(outdir):
|
for root, dirs, files in os.walk(outdir):
|
||||||
resourcedir = root.startswith(staticdir) or \
|
resourcedir = root.startswith(staticdir) or \
|
||||||
root.startswith(imagesdir)
|
root.startswith(imagesdir)
|
||||||
for fn in files:
|
for fn in sorted(files):
|
||||||
if (resourcedir and not fn.endswith('.js')) or \
|
if (resourcedir and not fn.endswith('.js')) or \
|
||||||
fn.endswith('.html'):
|
fn.endswith('.html'):
|
||||||
filename = path.join(root, fn)[olen:]
|
filename = path.join(root, fn)[olen:]
|
||||||
|
Loading…
Reference in New Issue
Block a user