]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-138061: Exclude __pycache__ directory from the computed digest in the...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 9 Dec 2025 18:16:19 +0000 (19:16 +0100)
committerGitHub <noreply@github.com>
Tue, 9 Dec 2025 18:16:19 +0000 (18:16 +0000)
Co-authored-by: alm <alonme@users.noreply.github.com>
Misc/NEWS.d/next/Build/2025-08-27-09-52-45.gh-issue-138061.fMVS9w.rst [new file with mode: 0644]
Tools/jit/_targets.py

diff --git a/Misc/NEWS.d/next/Build/2025-08-27-09-52-45.gh-issue-138061.fMVS9w.rst b/Misc/NEWS.d/next/Build/2025-08-27-09-52-45.gh-issue-138061.fMVS9w.rst
new file mode 100644 (file)
index 0000000..7af79d0
--- /dev/null
@@ -0,0 +1 @@
+Ensure reproducible builds by making JIT stencil header generation deterministic.
index 34f4e20b95d19bff90ab949f2142cdc42fd5001b..fe953ddddcfc080afe69fae6b05b86b8b183b533 100644 (file)
@@ -53,6 +53,9 @@ class _Target(typing.Generic[_S, _R]):
         hasher.update(PYTHON_EXECUTOR_CASES_C_H.read_bytes())
         hasher.update((out / "pyconfig.h").read_bytes())
         for dirpath, _, filenames in sorted(os.walk(TOOLS_JIT)):
+            # Exclude cache files from digest computation to ensure reproducible builds.
+            if dirpath.endswith("__pycache__"):
+                continue
             for filename in filenames:
                 hasher.update(pathlib.Path(dirpath, filename).read_bytes())
         return hasher.hexdigest()