带有所有附加功能的“pip install" [英] `pip install` with all extras
问题描述
一个pip install
的所有附加功能如何?我知道做这样的事情:
How does one pip install
with all extras? I'm aware that doing something like:
pip install -e .[docs,tests,others]
是一个选项.但是,是否可以执行以下操作:
is an option. But, is it possible to do something like:
pip install -e .[all]
这个问题类似于setup.py/setup.cfg install all extras.但是,那里的答案要求编辑 setup.cfg
文件.是否可以不修改setup.py
或setup.cfg
?
This question is similar to setup.py/setup.cfg install all extras. However, the answer there requires that the setup.cfg
file be edited. Is it possible to do it without modifying setup.py
or setup.cfg
?
推荐答案
是否可以在不修改 setup.py 或 setup.cfg 的情况下[安装所有附加功能]?
Is it possible to [install all extras] without modifying setup.py or setup.cfg?
否,直到包的作者在 setup.py 中声明了所有附加项.类似的东西
No until the author of the package declares all extras in setup.py. Something like
docs = […]
tests = […]
others = […]
all = docs + tests + others
setup(
…,
extras_require = {
'all': all,
'docs': docs,
'tests': tests,
'others': others,
},
…,
)
这篇关于带有所有附加功能的“pip install"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!