MCPcopy Create free account
hub / github.com/astral-sh/python-build-standalone / parse_shasums

Function parse_shasums

pythonbuild/mirror.py:91–108  ·  view source on GitHub ↗
(shasums_path: Path)

Source from the content-addressed store, hash-verified

89
90
91def parse_shasums(shasums_path: Path) -> list[str]:
92 if not shasums_path.exists():
93 raise SystemExit(f"{shasums_path} not found")
94
95 filenames: list[str] = []
96 for line in shasums_path.read_text().splitlines():
97 line = line.strip()
98 if not line:
99 continue
100
101 try:
102 _digest, filename = line.split(maxsplit=1)
103 except ValueError as e:
104 raise SystemExit(f"malformed line in {shasums_path}: {line!r}") from e
105
106 filenames.append(filename.lstrip("*"))
107
108 return filenames
109
110
111def destination_to_source_name(dest_name: str, tag: str, build_datetime: str) -> str:

Callers 1

build_upload_entriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected