7

For instance the following is built with bin/buildout -Nvv

...
Getting required 'grokcore.component>=2.5'
  required by five.grok 1.3.2.
  required by grokcore.viewlet 1.11.
Picked: grokcore.component = 2.5
Getting required 'grokcore.annotation'
  required by five.grok 1.3.2.
Picked: grokcore.annotation = 1.3
The constraint, 0.4, is not consistent with the requirement, 'five.localsitemanager>2.0dev'.
While:
  Installing instance.
Error: Bad constraint 0.4 five.localsitemanager>2.0dev

The constraint five.localsitemanager>2.0dev does not seem to be enforced by grokcore.annotation (see https://github.com/zopefoundation/grokcore.annotation/blob/master/setup.py) But how do I find out which egg is actually enforcing this?

Adam Terrey
  • 350
  • 1
  • 8

1 Answers1

6

I know this is a very old question, but I had the same problem yesterday and my colleague found a way to solve the problem. So I thought I might as well post it here.

All your buildout eggs are either in an eggs folder in your project or in a .buildout folder in your home folder, including development eggs. In each egg you'll find a requires.txt file with the requirements for the egg. This means you can do a find/grep on the .buildout/eggs folder for the specific constraint to find out which package is enforcing it.

So in your case I would suggest you go to the eggs directory (in my case ~/.buildout/eggs) and then do:

find .|grep requires.txt|xargs grep 2.0dev

That should find the egg that's enforcing the constraint.

In my case I was upgrading to Django 1.7 and there was one package with the constraint 'Django >= 1.4, < 1.7'. So executing find .|grep requires.txt|xargs grep 1.7 found the problematic egg.

Community
  • 1
  • 1
Heyl1
  • 2,437
  • 3
  • 24
  • 31
  • An addition: the `~/.buildout/eggs/` folder is only used if you enable it. Otherwise you have to look in the `eggs/` folder inside the project directory. – Reinout van Rees Apr 24 '15 at 08:57
  • Second comment: the `< 1.7` can be problematic as it can also be written as `<1.7` (without spaces) and so. Searching for the package name in the various `EGG-INFO/requires.txt` files is quicker. Something like `find . | grep requires.txt | xargs grep -i the-package-name ` – Reinout van Rees Apr 24 '15 at 09:04
  • 1
    Thanks for the additions @reinout-van-rees! I just looked in my `.bash_history` and that is indeed the command you used on my `.buildout/eggs` folder. I guess I wasn't paying close enough attention yesterday. I will update my answer. – Heyl1 Apr 24 '15 at 09:16
  • Thanks. It worked for me ... but I found it into the `parts/` directory. So it is better to run the grep command from the project directory root (the parent of `eggs/` folder) when the folder `~/.buildout/eggs/` is not used. – yucer May 31 '15 at 11:19