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

Function download_entry

pythonbuild/utils.py:362–375  ·  view source on GitHub ↗
(key: str, dest_path: pathlib.Path, local_name=None)

Source from the content-addressed store, hash-verified

360
361
362def download_entry(key: str, dest_path: pathlib.Path, local_name=None) -> pathlib.Path:
363 entry = DOWNLOADS[key]
364 url = entry["url"]
365 size = entry["size"]
366 sha256 = entry["sha256"]
367
368 assert isinstance(url, str)
369 assert isinstance(size, int)
370 assert isinstance(sha256, str)
371
372 local_path = dest_path / (local_name or url[url.rindex("/") + 1 :])
373 download_to_path(url, local_path, size, sha256)
374
375 return local_path
376
377
378def create_tar_from_directory(fh, base_path: pathlib.Path, path_prefix=None):

Callers 11

build_opensslFunction · 0.90
build_libffiFunction · 0.90
build_cpythonFunction · 0.90
fetch_strawberry_perlFunction · 0.90
simple_buildFunction · 0.90
build_binutilsFunction · 0.90
materialize_clangFunction · 0.90
build_muslFunction · 0.90
build_libeditFunction · 0.90
build_cpython_hostFunction · 0.90
build_cpythonFunction · 0.90

Calls 1

download_to_pathFunction · 0.85

Tested by

no test coverage detected