uv/crates/install-wheel-rs
Charlie Marsh f4939e50a6
Remove UNC prefixes on Windows (#1086)
## Summary

This PR adds a `NormalizedDisplay` trait that we can use for user-facing
paths, to strip the UNC prefix on Windows.

On other platforms, the implementation is a no-op (vs. `Display`).

I audited all usages of `.display()`, and changed any that were
user-facing, either via `println!` or `eprintln!`, or by way of being
included in error messages. I did _not_ change uses that were only in
tests or only went to tracing.

Closes https://github.com/astral-sh/puffin/issues/1084.
2024-01-25 11:44:22 -05:00
..
src Remove UNC prefixes on Windows (#1086) 2024-01-25 11:44:22 -05:00
windows-launcher Copy over install-wheel-rs crate (#33) 2023-10-06 21:38:38 -04:00
Cargo.toml Remove UNC prefixes on Windows (#1086) 2024-01-25 11:44:22 -05: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.