From 27cdf8d389d63c7f52f49028bca7d3274340c5de Mon Sep 17 00:00:00 2001 From: Gregor Weiss Date: Fri, 12 Apr 2024 12:13:47 +0200 Subject: [PATCH] hardcode somewhat logical order of header files in public_header.py append possibly missing header files assumes that missing header files need no dedicated position in list --- public_header.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public_header.py b/public_header.py index 595ebd8..1e5855e 100644 --- a/public_header.py +++ b/public_header.py @@ -91,9 +91,12 @@ destination = current_path.joinpath('include/library/public') if os.path.isdir(destination) == False: os.mkdir(destination) -header_files = [f for f in os.listdir(source) if os.path.isfile(os.path.join(source, f))] -header_files.remove('prim_types_double.h') -header_files.remove('prim_types_single.h') +all_header_files = [f for f in os.listdir(source) if os.path.isfile(os.path.join(source, f))] +all_header_files.remove('prim_types_double.h') +all_header_files.remove('prim_types_single.h') +header_files = ['macros.h', 'constants.h', 'dwt.h', 'tagtree.h', 'mq_types.h', 'mq.h', + 'bitstream.h', 'codestream.h', 'tier1.h', 'tier2.h', 'types.h', 'libbwc.h'] +header_files += [element for element in all_header_files if element not in header_files] print(header_files) #----------------------------------------------------------#