我想将reoze Zope2安装的所有要求放在pip requirements file中。大多数repoze软件包似乎都不在PyPi上,但它们有一个替代的PyPi索引here。但是我不知道如何告诉pip与需求文件一起使用该索引。对于单个包装,这很容易

pip install zopelib -i http://dist.repoze.org/zope2/2.10/simple/

我尝试了以下
pip install -r requirements.txt -i http://dist.repoze.org/zope2/2.10/simple/

或在我的requirements.txt中这些的所有种类或排列:
zopelib -i http://dist.repoze.org/zope2/2.10/simple/
zopelib --index http://dist.repoze.org/zope2/2.10/simple/
-i http://dist.repoze.org/zope2/2.10/simple/ zopelib

或(因为documentation说“请注意,所有这些选项都必须排成一行。”)
--index http://dist.repoze.org/zope2/2.10/simple/
zopelib

那么,告诉pip使用http://dist.repoze.org/zope2/2.10/simple/作为索引的正确方法是什么?

最佳答案

requirements.txt:

-i http://dist.repoze.org/zope2/2.10/simple
zopelib

例子:
$ pip install -r requirements.txt
...
Successfully installed zopelib

08-24 20:15