Skip to content

Commit 4bb41b2

Browse files
committed
Exclude .pyc files from the computed digest in the jit stencils
1 parent be24ff0 commit 4bb41b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tools/jit/_targets.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def _compute_digest(self) -> str:
7272
hasher.update((self.pyconfig_dir / "pyconfig.h").read_bytes())
7373
for dirpath, _, filenames in sorted(os.walk(TOOLS_JIT)):
7474
for filename in filenames:
75+
# Exclude .pyc files from digest computation to ensure reproducible builds.
76+
if filename.endswith(".pyc"):
77+
continue
7578
hasher.update(pathlib.Path(dirpath, filename).read_bytes())
7679
return hasher.hexdigest()
7780

0 commit comments

Comments
 (0)