mirror of https://github.com/astral-sh/uv
## Summary I added `crates/uv-python/create-mirror.py` to make it easy to download all the needed files to create a mirror for Python distributions in an offline environment. the script also has an option to iterate over the git history of the `download-metadata.json` to make sure we have all the files needed for all the uv versions ## Test Plan ``` uv run create-mirror.py --from-all-history --os linux --arch x86_64 --name cpython 2024-10-25 01:31:12,973 - INFO - Starting download of 466 files. Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 466/466 [06:11<00:00, 1.26file/s] Successfully downloaded: 466 now you can run UV_PYTHON_INSTALL_MIRROR='file:///home/meitar/dev/uv/crates/uv-python/mirror' uv python install ``` then checked (the `unshare` command make sure that the process don't have any netwok) ``` UV_PYTHON_INSTALL_MIRROR=file:///home/meitar/dev/uv/crates/uv-python/mirror sudo -E unshare -n /home/meitar/.local/bin/uv python install 3.13 Searching for Python versions matching: Python 3.13 Installed Python 3.13.0 in 2.91s + cpython-3.13.0-linux-x86_64-gnu ``` --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com> |
||
|---|---|---|
| .. | ||
| benchmark | ||
| links | ||
| packages | ||
| popular_packages | ||
| publish | ||
| requirements | ||
| scenarios | ||
| workspaces | ||
| check_cache_compat.py | ||
| check_embedded_python.py | ||
| check_system_python.py | ||
| create-python-mirror.py | ||
| release.sh | ||
| sync_scenarios.sh | ||
| transform_readme.py | ||
| update_schemastore.py | ||
| uv-run-remote-script-test.py | ||