MCPcopy
hub / github.com/astral-sh/python-build-standalone / hash_path

Function hash_path

pythonbuild/utils.py:127–138  ·  view source on GitHub ↗
(p: pathlib.Path)

Source from the content-addressed store, hash-verified

125
126
127def hash_path(p: pathlib.Path):
128 h = hashlib.sha256()
129
130 with p.open("rb") as fh:
131 while True:
132 chunk = fh.read(65536)
133 if not chunk:
134 break
135
136 h.update(chunk)
137
138 return h.hexdigest()
139
140
141def get_target_support_file(

Callers 2

download_to_pathFunction · 0.85
compress_python_archiveFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected