Allow installing `provides_extras` from local wheel file
See original GitHub issueWhat’s the problem this feature will solve?
Would like pip install mypackage-0.1.0-py3-none-any.whl to be able to optionally install the provides_extras metadata present within the wheel.
Describe the solution you’d like
Consider a package that contains the following in its setup.py:
setup(
...
extras_require={
"encryption": ["tinyaes"],
},
Building a bdist_wheel, we can see that this information is persisted into the wheel using pkginfo:
% pkginfo mypackage-0.1.0-py3-none-any.whl
...
provides_extras: ['encryption']
Distributing the .whl file to users is a convenient way to distribute the packaged application. It would be helpful if pip allowed for installing the provides_extras like is possible if the wheel were published to PyPI. The normal [encryption] prefix syntax does not work because pip is expecting a file path.
$ pip install --with-extras=encryption mypackage-0.1.0-py3-none-any.whl
Alternative Solutions
pip could try to re-use the same magic syntax and strip [...] from the end of file names.
$ pip install mypackage-0.1.0-py3-none-any.whl[encryption]
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)

Top Related StackOverflow Question
(Also, this is off topic but your
furoSphinx theme is awesome! Thanks for publishing it. ❤️ )Wait,
pip install 'dist/package-0.1-py3-none-any.whl[extra]'works.