uv/crates/install-wheel-rs/src
Charlie Marsh 324e9fe5cf
Respect data scripts in uv tool install (#4693)
## Summary

Packages that provide scripts that _aren't_ Python entrypoints need to
respected in `uv tool install`. For example, Ruff ships a script in
`ruff-0.5.0.data/scripts`.

Unfortunately, the `.data` directory doesn't exist in the virtual
environment at all (it's removed, per the spec, after install). So this
PR changes the entry point detection to look at the `RECORD` file, which
is the only evidence that the scripts were installed.

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

## Test Plan

`cargo run uv tool install ruff` (snapshot tests to-come)
2024-07-01 12:22:37 -04:00
..
lib.rs Respect data scripts in uv tool install (#4693) 2024-07-01 12:22:37 -04:00
linker.rs Respect data scripts in uv tool install (#4693) 2024-07-01 12:22:37 -04:00
metadata.rs Loosen .dist-info validation to accept arbitrary versions (#2441) 2024-03-14 09:04:39 -04:00
record.rs Respect data scripts in uv tool install (#4693) 2024-07-01 12:22:37 -04:00
script.rs Respect data scripts in uv tool install (#4693) 2024-07-01 12:22:37 -04:00
uninstall.rs Fix existing typos and enable typos in CI (#4184) 2024-06-10 01:50:54 +00:00
wheel.rs Respect data scripts in uv tool install (#4693) 2024-07-01 12:22:37 -04:00