mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-15 04:49:41 +00:00
![]() ## Summary It turns out that if `path` is a symlink, `File::create(path)?.write_all(content.as_ref())?` will overwrite the _target_ file. That means an entrypoint named `python` would actually overwrite the user's source Python executable, which is symlinked into the virtual environment. This PR replaces that code with our atomic write method. Closes https://github.com/astral-sh/uv/issues/5152. ## Test Plan I ran through the test plan `https://github.com/astral-sh/uv/issues/5152`, but used an executable named `bar` linked to `foo.txt` instead... |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
Readme.md |
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.