2017-07-27 124 views
0

這裏的依賴是我buildout.cfg忽略與擴建

[buildout] 
extends = versions.cfg 
eggs = package1 
     package2 
parts = installeggs 

[installeggs] 
recipe = zc.recipe.egg 
eggs = ${buildout:eggs} 

而且我versions.cfg

[versions] 
package1 = 1.0 
package2 = 2.0 

不幸的是,package2的版本需要的package1另一個版本。

Error: The requirement ('package1>=2.0') is not allowed by your [versions] constraint (1.0) 

有沒有我不知道反正安裝此版本的package1的選擇嗎?例如像pip的--no-deps選項。

回答

0

我使用的解決方法包括運行pip install --no-deps,但它迫使我聲明另一部分。

[buildout] 
extends = versions.cfg 
eggs = package1 
#  package2 
parts = installeggs 
     forceinstall 

[installeggs] 
recipe = zc.recipe.egg 
eggs = ${buildout:eggs} 

[forceinstall] 
recipe = collective.recipe.cmd 
on_install = true 
cmds = ${buildout:directory}/bin/pip install --no-deps package2==2.0