Document self-referential extras now that pip officially supports it - #2087
Document self-referential extras now that pip officially supports it#2087Trenza1ore wants to merge 5 commits into
Conversation
Relevant PR: pypa/pip#14157 Relevant Issue: pypa/pip#11296
for more information, see https://pre-commit.ci
|
Should there also be a "several installers" note in the writing toml page? I think it's not officially a standard, this is just says most installers support it? Getting it standardized is a bigger effort (but maybe a worthwhile one?). |
I'll update the toml page with a list of package installers supporting self-referential extras. Will test a few more and make a list.
Totally agree, that should probably be standardized at some point as there are many packages using self-referential extras already. |
|
You have a note on one of the two pages, having it on the other makes sense too. I think pip + uv is fine, but if you want to add more (Poetry?), the more the merrier (within reason!). :) |
I've updated the list of supported installers/dependency managers, created a test repo to verify. Anything except |
Using self-referential extras is a more preferable pattern than to manually write, for example, an
allextra for all dependencies combined (which is both tedious and easy to fall out of sync with reality).Following pypa/pip#14157, this is now a documented and tested feature of
pip(supported unofficially since v21.2).Closes #2086
📚 Documentation preview 📚: https://python-packaging-user-guide--2087.org.readthedocs.build/en/2087/