2013-01-11 90 views
1

我發現了幾個與dependency_links有關的答案,但他們很遺憾還沒有爲我工作。我正在寫一個Python模塊。它存儲在一個私人的PyPI回購,並依賴於存儲一些依賴都在同一個私人回購和public pypi repository如何在pip中安裝公共依賴的私有模塊?

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庫的依賴,同時從我的私人安裝一個我的模塊?

回答