pythondependency-managementbuildoutegg

Ignore dependency with buildout


Here is my buildout.cfg:

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

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

And my versions.cfg:

[versions]
package1 = 1.0
package2 = 2.0

Unfortunately, package2's version requires another version of package1.

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

Is there an option I'm not aware of to install this version of package1 anyway? Something like the --no-deps option of pip for instance.


Solution

  • I use a workaround consisting in running pip install --no-deps, but it forced me to declare another part.

    [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