uv
uv copied to clipboard
Support man pages for `uv tool`
Summary
This PR adds support for man pages for uv tool by treating entrypoints and manpages as tool resources and changing a series of related functions. The receipt is also modified to conditionally write manpages tables when manpages exist.
The uv tool install and uv tool uninstall have been tested, but not uv tool upgrade (which might require a more suitable package or methodology). Guidance from reviewers or maintainers would be greatly appreciated.
Some of the following may need confirmation from maintainers or reviewers before implementation:
- Add the
UV_TOOL_MAN_DIRenvironment variable for specifying the location of manpages. - Show manpage information in the
uv tool listcommand (although pipx also shows manpage information, I'm unsure if we want to include this in theuv tool listcommand as well).
Resolves #4731.
Test Plan
cargo test --test tool_dir --test tool_install --test tool_list --test tool_run --test tool_uninstall --test tool_upgrade