-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial implementation of uv tool run
#3657
Conversation
92dd1dd
to
68e4a18
Compare
uv_virtualenv::Prompt::None, | ||
false, | ||
false, | ||
)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately, will these be installed in some sort of global directory that's also exposed on PATH, either by adding at install time or via some kind of ensurepath
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see this in #3560 now. If the tool is already installed in the user environment, it will be used, but uv tool run
on its own will not install the tool. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah uv tool run
will not install a tool. It could cache the environment and will support detecting user-installed and project-level tools but we don't have those yet here. I've already started a branch for uv tool install
— it's just much more complex as a starting point.
Prompted by #3657 (comment) There's still some level of discomfort here, as the `tool` module needs needs to import the `project` module to manage an environment. We should probably move most of the basic operations in the `project` module root into some sort of shared module for behind the scenes operations? Regardless, this change should simplify that future move.
32ae0db
to
fdcab26
Compare
# Conflicts: # crates/uv/src/commands/mod.rs # crates/uv/src/commands/project/run.rs # Conflicts: # crates/uv/src/commands/project/mod.rs
This is mostly a shorter version of
uv run
that infers a requirement name from the command. The main goal here is to do the smallest amount of work necessary to get #3560 started.Closes #3613
e.g.