开发者

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

There seem to be mo开发者_Go百科re 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜