uv/crates/uv-python
konstin 05ae3a9675 Cache managed Python archive downloads
Part of #11834

Split the download-and-extract of manged Python interpreters into a download to the cache and an extract-and-install phase. This allows quickly re-installing Python interpreters when they are cached, and caching Python installation in tests and CI (follow-up PR).

Ideally, we would still have a combined download-and-extract step if the interpreter is available locally, but I couldn't figure out how to tee the stream in reasonable complexity. I nearly succeeded going through a futures `Stream`, but I couldn't figure out how to pass the second writer to the `Stream::then` `FnMut` in a way the borrow checker would accept.

Locally for me, `cargo test -p uv -- python_install` goes from 43s to 7s when setting `UV_PYTHON_CACHE_DIR`.
2025-03-14 13:01:49 +01:00
..
python Fix GraalPy abi tag parsing and discovery (#12154) 2025-03-13 23:55:07 +00:00
src Cache managed Python archive downloads 2025-03-14 13:01:49 +01:00
Cargo.toml Make interpreter caching robust to OS upgrades (#11875) 2025-03-02 01:36:38 +00:00
download-metadata.json Add support for dynamic musl Python distributions on x86-64 Linux (#12121) 2025-03-11 18:14:10 -05:00
fetch-download-metadata.py Add support for dynamic musl Python distributions on x86-64 Linux (#12121) 2025-03-11 18:14:10 -05:00
template-download-metadata.py Update riscv64 Python downloads to allow install on riscv64gc (#10937) 2025-01-24 09:33:29 -06:00