-
Notifications
You must be signed in to change notification settings - Fork 906
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
FR: add support for uv pip install <PyPI package> --all-extras
#7295
Comments
Would |
I think per-package makes more sense. |
Actually I'm not 100% I get what you mean by per-package. What I'd like to happen is that everything from the requested package's optional dependencies is installed, ignoring existing their extras. IIUC that would be the same behavior as installing a package from a path with Does this make sense ? |
For example, let's say I had a requirements file:
And a constraints file:
And I ran: Which packages out of Aaa, Bbb, Ccc, Ddd, Eee, should have requested all extras? |
I'd say |
Yeah, ignore the constraints, they don't work well with extras anyway, I was trying to think of unusual edge cases. IMO the only sensible approach would be to include all user provided requirements, all those provided over the CLI, and all those provided in requirements file, having a flag depend on how you provided non-local requirements would be susprising and not fit with any existing flag I think? I think It might also be a breaking change with the way users currently use it currently? E.g. would this affect A similiar topic has been on my mind this last week, hence the questions, my idea is about making this easier to define in the |
Agreed. Anything else would be both more surprising and less maintainable.
Oof, this made me realize I don't know what
I didn't know self referential extras weren't documented. This is actually what the packages I have in mind (yt and astropy) already use ! |
I know of a couple packages with so many optional dependencies that they implement a shorthand to get all of them as, for instance
pip install 'pkg[all]'
or something similar. Problem is that this is hardly discoverable for end users, must be documented, and not every package chooses the sameextra
name so it's hard to remember.uv pip install <PyPI package> --all-extras
would seem like a natural solution here but currently (as of uv 0.4.9) doesn't support this:Is it something that could be considered in the future ?
The text was updated successfully, but these errors were encountered: