簡體   English   中英

帶有所有附加功能的“pip install”

[英]`pip install` with all extras

一個pip install如何pip install所有附加功能? 我知道做這樣的事情:

pip install -e .[docs,tests,others]

是一種選擇。 但是,是否可以執行以下操作:

pip install -e .[all]

這個問題類似於setup.py/setup.cfg install all extras 但是,那里的答案要求編輯setup.cfg文件。 是否可以在修改setup.pysetup.cfg情況下做到這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,
    },
    …,
)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM