Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use buildout:eggs and when to install via zc.recipe.egg?

There seem to be more than one way to install eggs into a buildout.

Way 1:

[buildout]
...
eggs = 
     eggname
     othereggname
...

Way 2:

[buildout]
...
parts = eggs

[eggs]
recipe = zc.recipe.egg
eggs = eggname
     = othereggname

Both ways work. ( variation on way 2 would be to install each requirement as a separate part. )

What is the difference between these 2 methods?

For my projects, I'm using buildout with djangorecipe and mr.developer.

like image 623
chiggsy Avatar asked Nov 06 '22 13:11

chiggsy


1 Answers

In both cases, the "eggs=" makes those eggs available to that part, which means they're getting installed.

The buildout eggs don't get any additional treatment.

The big difference is that "recipe = zc.recipe.egg" ALSO tries to create scripts for all the eggs defined there. (Scripts meaning the "console_scripts" entry points, not the old distutils "scripts=", btw)

The way I normally work: I use the eggs in [buildout] to list my most important eggs ("myproject"). In the djangorecipe part, I have basically an "eggs = ${buildout:eggs}".

And a [console_scripts] part with the zc.recipe.egg recipe to make clear that I want console scripts out of the eggs there. I put extra tools like pep8 in there.

like image 118
Reinout van Rees Avatar answered Nov 12 '22 20:11

Reinout van Rees