From 6af096eb4bcdd874e089717574284b41f757d4c5 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 4 May 2022 16:48:15 +0200 Subject: [PATCH] Sort input file list so that `gtkmm-tutorial/index.docbook` builds in a reproducible way in spite of indeterministic filesystem readdir order and http://bugs.python.org/issue30461 This PR was done while working on reproducible builds for openSUSE. --- docs/tutorial/insert_example_code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/insert_example_code.py b/docs/tutorial/insert_example_code.py index bba1193..e515d55 100755 --- a/docs/tutorial/insert_example_code.py +++ b/docs/tutorial/insert_example_code.py @@ -62,8 +62,8 @@ def insert_example_code(examples_base_dir, input_xml_files, output_xml_file): # List all the source files in the examples directory. source_directory = os.path.join(examples_base_dir, source_include_match.group(1)) - for source_filename in glob.glob(os.path.join(source_directory, '*.h')) + \ - glob.glob(os.path.join(source_directory, '*.cc')): + for source_filename in sorted(glob.glob(os.path.join(source_directory, '*.h'))) + \ + sorted(glob.glob(os.path.join(source_directory, '*.cc'))): source_basename = os.path.basename(source_filename) process_source_file(source_directory, source_basename, outfile, True) -- GitLab