MCPcopy
hub / github.com/Nuitka/Nuitka / _makeRecordData

Function _makeRecordData

nuitka/utils/Distributions.py:185–201  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

183
184
185def _makeRecordData(filename):
186 h = hashlib.sha256()
187 length = 0
188
189 try:
190 with open(filename, "rb") as file_handle:
191 for block in _readChunks(file_handle):
192 length += len(block)
193 h.update(block)
194 except IOError:
195 pass
196
197 digest = "sha256=" + base64.urlsafe_b64encode(h.digest()).decode("latin1").rstrip(
198 "="
199 )
200
201 return digest, str(length)
202
203
204def checkDistributionMetadataRecord(package_dir, distribution):

Callers 1

Calls 3

_readChunksFunction · 0.85
lenFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…