I'd like pip install foo[*]
to install a package and ALL of it's extras.
This would allow those that want to make sure they have all the possible integrations to have them without searching first.
pip install foo[*]
, it doesn't work
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'[*]'"
This needs the topic - extras
label (like https://github.com/pypa/pip/issues/4824) @pradyunsg
I should have commented -- added.
Installing all of extras is a must!
The feature should probably not break the PEP 508 (final) about _dependency specification for Python Software Packages_ since extras names must comply the same criteria as any package names (*
is not a valid package name).
Should it support generic globbing syntax? For instance
Given the
foo
package withdev_doc
,dev_cqa
and
should it be possible to pip install foo[dev*]
in order to get both dev_doc
and dev_cqa
extras requirements?
Back reference for a related PBR issue: https://bugs.launchpad.net/pbr/+bug/1672874
This would be a really helpful feature, especially when there are numerous extras
Per PEP 426 this should be pip install foo[all]
Duplicate to #4340 btw
PEP 426 is a "Withdrawn" PEP. It is not an active standard, so does not have any influence on pip's behavior.
Of course, that's why this bug might never be fixed
Not true. PEP 426 was withdrawn because it was too large and complex, and people couldn't reach agreement. A smaller, more focused, proposal would not have this issue and may be accepted (no promises, of course!).
The problem is that no-one with an interest in the topic has yet volunteered their time to create such a proposal, manage the discussions, take it through to acceptance, and then implement it.
Have you seen the reason, why #4340 was closed? The same applies to this. I also don't like this bug is a wontfix, but there are simple workarounds, so it is not a big deal.
Yes, it says we won't support a feature like this unless it's backed by a standard. That's why I said "A smaller, more focused, proposal would not have this issue" - there's nothing stopping someone trying to get a standard accepted that just covered the "wildcard extra" part of PEP 426. And if such a proposal were accepted, pip would support it (assuming someone actually wrote the code).
This "bug" (it's actually a feature request) is emphatically not "wontfix" - it's waiting on someone to do the work of implementing it. But the pip developers are unlikely to get to it any time soon, so it'll need community help to get anywhere.
As mentioned above, we aren't going to unilaterally implement a feature like this without it being backed by something like a PEP. Anyone interested in doing that groundwork can start a discussion over in discuss.python.org to start (or the mailing list).
Since there's no immediate action for pip here I will close this. Thanks everyone that contributed to this discussion!
Most helpful comment
This would be a really helpful feature, especially when there are numerous extras