My Python package has optional features (extras_require) and I would prefer them to be selected by default.
More specifically, I'd like that pip install mypackage behaves like pip install mypackage[extra] and that I can install a minimal version with something like pip install mypackage[core].
setup(
name="mypackage",
...
extras_require={
"extra": ["extra1>=1.2", "extra2"],
"core": [],
}
)
Is it possible to achieve this with a setup script similar to above?
Unfortunately this is not possible with the current state of Python packaging metadata & tooling.
See a long discussion here as to why.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With