uv/crates/install-wheel-rs
Charlie Marsh 5d53040465
Stream zip archive when fetching non-range-request metadata (#1792)
## Summary

If a registry doesn't support range requests, then today, we download
the entire wheel to disk and then read the metadata from the downloaded
archive. This PR instead modifies the registry client to stream the
zipfile and stop as soon as it's seen the metadata, which should be more
efficient.

Closes https://github.com/astral-sh/uv/issues/1596.

## Test Plan

Made this the _only_ path for downloading metadata; verified that the
test suite passed.
2024-02-20 22:12:21 -05:00
..
src Stream zip archive when fetching non-range-request metadata (#1792) 2024-02-20 22:12:21 -05:00
Cargo.toml Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
Readme.md Copy over install-wheel-rs crate (#33) 2023-10-06 21:38:38 -04:00

Reimplementation of wheel installing in rust. Supports both classical venvs and monotrail.

There are simple python bindings:

from install_wheel_rs import LockedVenv

locked_venv = LockedVenv("path/to/.venv")
locked_venv.install_wheel("path/to/some_tagged_wheel.whl")

and there's only one function: install_wheels_venv(wheels: List[str], venv: str), where wheels is a list of paths to wheel files and venv is the location of the venv to install the packages in.

See monotrail for benchmarks.