| 1 |
From: YOKOTA Hiroshi <[email protected]> |
| 2 |
Date: Thu, 15 Dec 2022 00:28:11 +0900 |
| 3 |
Subject: Sort files and directories for reproducible build |
| 4 |
|
| 5 |
Forwarded: not-needed |
| 6 |
|
| 7 |
note: |
| 8 |
os.walk() returns generator, not list. |
| 9 |
sorted() is not usable here. |
| 10 |
--- |
| 11 |
setup/gui.py | 4 +++- |
| 12 |
1 file changed, 3 insertions(+), 1 deletion(-) |
| 13 |
|
| 14 |
diff --git a/setup/gui.py b/setup/gui.py |
| 15 |
index 339df62..2802dab 100644 |
| 16 |
--- a/setup/gui.py |
| 17 |
+++ b/setup/gui.py |
| 18 |
@@ -50,7 +50,9 @@ class GUI(Command): |
| 19 |
try: |
| 20 |
os.chdir(self.RESOURCES) |
| 21 |
sources, files = [], [] |
| 22 |
- for root, _, files2 in os.walk('images'): |
| 23 |
+ for root, dirs, files2 in os.walk('images'): |
| 24 |
+ dirs.sort() |
| 25 |
+ files2.sort() |
| 26 |
for name in files2: |
| 27 |
sources.append(os.path.join(root, name)) |
| 28 |
if self.newer(self.RCC, sources): |