[gtkmm-documentation/gtkmm-3-24] Sort input file list



commit c2cad6ed953bfd621a516ecaf7da5e9a65cda414
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date:   Wed May 4 16:48:15 2022 +0200

    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 36d6623..13a3f75 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)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]