| 66 | return nop |
| 67 | |
| 68 | def _compute_digest(self) -> str: |
| 69 | hasher = hashlib.sha256() |
| 70 | hasher.update(self.triple.encode()) |
| 71 | hasher.update(self.debug.to_bytes()) |
| 72 | hasher.update(self.cflags.encode()) |
| 73 | # These dependencies are also reflected in _JITSources in regen.targets: |
| 74 | hasher.update(PYTHON_EXECUTOR_CASES_C_H.read_bytes()) |
| 75 | hasher.update((self.pyconfig_dir / "pyconfig.h").read_bytes()) |
| 76 | for dirpath, _, filenames in sorted(os.walk(TOOLS_JIT)): |
| 77 | # Exclude cache files from digest computation to ensure reproducible builds. |
| 78 | if dirpath.endswith("__pycache__"): |
| 79 | continue |
| 80 | for filename in sorted(filenames): |
| 81 | hasher.update(pathlib.Path(dirpath, filename).read_bytes()) |
| 82 | return hasher.hexdigest() |
| 83 | |
| 84 | async def _parse(self, path: pathlib.Path) -> _stencils.StencilGroup: |
| 85 | group = _stencils.StencilGroup() |