Question

I have a buildout configuration that calls two recipes. The two recipes have to be executed in a defined order.

The recipe that is to be executed last is fetched from a git repository by the mr.developer extension. However, when mr.developer pulls in the recipe, it sees this as an egg and executes this first. This messes up the correct order and the buildout fails.

I have tried to set egg=false so the recipe doesn't get executed first, however this prevents the recipe from being executed in total because it isn't an egg.

To give an idea what my buildout.cfg looks like:

[buildout]
develop = .
extensions = mr.developer
auto-checkout = custom-recipe
parts =
    part-one
    part-two

[sources]
custom-recipe = git http://location.of.repo

[part-one]
recipe = recipe.from.pypi
src = ${buildout:directory}

[part-two]
recipe = custom-recipe
src = ${part-one:src}

The order in which parts appear in buildout:parts should be respected. If a part refers to another part the order can be changed so that dependencies are correct. I've tried to 'trick' buildout by refering to part-one from part-two, this doesn't work because mr.developer already refers to part-two.

Any help would be greatly appreciated.

Was it helpful?

Solution

After some testing I found out what the problem was. A recipe has three parts: a constructor, an install and a update function. The constructor is called before all installs occur, this caused the confusion.

I had some things in the constructor that depended upon other parts. Because the constructor was called before all installs occur the code failed. After moving it to the install function, all went well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top