From: YOKOTA Hiroshi Date: Thu, 15 Dec 2022 00:28:11 +0900 Subject: Sort files and directories for reproducible build Forwarded: not-needed note: os.walk() returns generator, not list. sorted() is not usable here. --- setup/gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/gui.py b/setup/gui.py index 339df62..2802dab 100644 --- a/setup/gui.py +++ b/setup/gui.py @@ -50,7 +50,9 @@ class GUI(Command): try: os.chdir(self.RESOURCES) sources, files = [], [] - for root, _, files2 in os.walk('images'): + for root, dirs, files2 in os.walk('images'): + dirs.sort() + files2.sort() for name in files2: sources.append(os.path.join(root, name)) if self.newer(self.RCC, sources):