通过构建忽略依赖关系



这是我的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选项。

我使用了一种包含运行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

相关内容

  • 没有找到相关文章

最新更新