我找到了一些与dependency_links 相关的答案,但不幸的是它们还没有为我工作。我正在编写一个 python 模块。它存储在私有 pypi 存储库中,并依赖于存储在同一个私有存储库和公共 pypi 存储库中的一些依赖项:
setup(
# some other setup
name = 'mymodule',
install_requires = [
'kazoo',
'privateDependencyA',
'privateDependencyB'
],
dependency_links = [
"http://my.private.repo/eggs/#privateDependencyA",
"http://my.private.repo/eggs/#privateDependencyB"
])
我存储mymodule
在我的私人存储库中,因此我尝试安装它:
pip install -i http://my.private.repo/eggs/ mymodule
这工作得很好,但找不到kazoo
公共图书馆。因此我尝试了-f
标志:
$ pip install -i http://my.private.repo/eggs/ -f http://pypi.python.org/ mymodule
Downloading/unpacking mymodule
Downloading mymoudle-<version>.tar.gz (unknown size): 3.1kB downloaded
Running setup.py egg_info for package mymodule
Downloading/unpacking kazoo (from mymodule)
Could not find any downloads that satisfy the requirement kazoo (from mymodule)
Downloading/unpacking kazoo (from mymodule)
Could not find any downloads that satisfy the requirement kazoo (from mymodule)
如何从公共 pypi 存储库下载依赖项,同时从我的私人存储库安装我的模块?