Jen*_*sun 5 python pip setuptools
一个pip install
有所有额外功能的怎么办?我知道做这样的事情:
pip install -e .[docs,tests,others]
Run Code Online (Sandbox Code Playgroud)
是一种选择。但是,是否可以执行以下操作:
pip install -e .[all]
Run Code Online (Sandbox Code Playgroud)
这个问题类似于setup.py/setup.cfg install all extras。但是,那里的答案要求setup.cfg
编辑该文件。是否有可能做到这一点无需修改setup.py
或setup.cfg
?
是否可以在不修改 setup.py 或 setup.cfg 的情况下[安装所有附加功能]?
直到包的作者在 setup.py 中声明了所有附加项。就像是
docs = […]
tests = […]
others = […]
all = docs + tests + others
setup(
…,
extras_require = {
'all': all,
'docs': docs,
'tests': tests,
'others': others,
},
…,
)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
643 次 |
最近记录: |