-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[core] [9/N] Skip uv install if match #48668
[core] [9/N] Skip uv install if match #48668
Conversation
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
I think we can always reinstall to make the code simpler which should be an no-op by uv? |
If user requested version is always installed on the env, why bother re-installing? |
The win for this PR is to reduce runtime overhead by |
# If exists, the output format would look like | ||
# uv <version> (<sha> <release date>), for example, | ||
# uv 0.5.1 (f399a5271 2024-11-08) | ||
version_strs = version_output.split() | ||
if len(version_strs) == 4 and version_strs[0] == "uv": | ||
return version_strs[1] |
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.
I think this is fragile. The output format can change at anytime. Do we have other way to get the version?
I was thinking that pip should do nothing if the specified version is already installed (basically pip does the skip for us) |
That makes sense, though I'm thinking to skip |
Followup on #48634, which skip installation if specified version matches what we have in virtual env.