This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new 47c0a03ad NO-JIRA: Sort input file list
47c0a03ad is described below
commit 47c0a03ad44ece00e74deb2a8a7351ee4fa16125
Author: Bernhard M. Wiedemann <bernhard+gitcommit lsmod.de>
AuthorDate: Mon Oct 16 03:41:00 2023 +0200
NO-JIRA: Sort input file list
so that `_cproton.cpython-310-x86_64-linux-gnu.so` builds in a reproducible
way
in spite of non-deterministic filesystem readdir order
See https://reproducible-builds.org/ for why this is good.
This patch was done while working on reproducible builds for openSUSE.
---
python/ext_build.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/ext_build.py b/python/ext_build.py
index 7247366a1..7a1284699 100644
--- a/python/ext_build.py
+++ b/python/ext_build.py
@@ -40,7 +40,9 @@ proton_c_include = os.path.join(proton_base, 'include')
sources = []
extra = []
libraries = []
-for root, _, files in os.walk(proton_core_src):
+for root, dirs, files in os.walk(proton_core_src):
+ dirs.sort() # needed for os.walk to process directories in deterministic
order
+ files.sort()
for file_ in files:
if file_.endswith(('.c', '.cpp')):
sources.append(os.path.join(root, file_))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]