MCPcopy Index your code
hub / github.com/astral-sh/python-build-standalone / write_package_versions

Function write_package_versions

pythonbuild/utils.py:222–229  ·  view source on GitHub ↗

Write out versions of packages to files in a directory.

(dest_path: pathlib.Path)

Source from the content-addressed store, hash-verified

220
221
222def write_package_versions(dest_path: pathlib.Path):
223 """Write out versions of packages to files in a directory."""
224 dest_path.mkdir(parents=True, exist_ok=True)
225
226 for k, v in DOWNLOADS.items():
227 p = dest_path / ("VERSION.%s" % k)
228 content = "%s_VERSION := %s\n" % (k.upper().replace("-", "_"), v["version"])
229 write_if_different(p, content.encode("ascii"))
230
231
232def write_cpython_version(dest_path: pathlib.Path, version: str):

Callers 1

mainFunction · 0.90

Calls 1

write_if_differentFunction · 0.85

Tested by

no test coverage detected