From a35b9fc23a537b044a9702a9973941e4a4311e68 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 26 Aug 2024 18:23:44 +0100 Subject: [PATCH] Build bindings reproducibly (#836) `glob` output isn't guaranteed to be in any particular order, so `_sodium.*.so` wasn't always reproducible. --- src/bindings/build.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bindings/build.py b/src/bindings/build.py index 96342374..777237b9 100644 --- a/src/bindings/build.py +++ b/src/bindings/build.py @@ -22,12 +22,16 @@ __all__ = ["ffi"] -HEADERS = glob.glob( - os.path.join(os.path.abspath(os.path.dirname(__file__)), "*.h") +HEADERS = sorted( + glob.glob(os.path.join(os.path.abspath(os.path.dirname(__file__)), "*.h")) ) -MINIMAL_HEADERS = glob.glob( - os.path.join(os.path.abspath(os.path.dirname(__file__)), "minimal", "*.h") +MINIMAL_HEADERS = sorted( + glob.glob( + os.path.join( + os.path.abspath(os.path.dirname(__file__)), "minimal", "*.h" + ) + ) )