File: reproducible-bindings.patch

package info (click to toggle)
python-nacl 1.5.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,772 kB
  • sloc: ansic: 45,889; python: 7,249; sh: 6,752; asm: 2,974; makefile: 1,010; cs: 35; xml: 30; pascal: 11
file content (38 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Colin Watson <cjwatson@debian.org>
Date: Mon, 26 Aug 2024 17:48:49 +0100
Subject: Build bindings reproducibly

`glob` output isn't guaranteed to be in any particular order, so
`_sodium.*.so` wasn't always reproducible.

Forwarded: https://github.com/pyca/pynacl/pull/836
Last-Update: 2024-08-26
---
 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 9634237..777237b 100644
--- a/src/bindings/build.py
+++ b/src/bindings/build.py
@@ -22,12 +22,16 @@ from cffi import FFI
 __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"
+        )
+    )
 )