[Grok-dev] Re: Defining 3rd-party eggs within a grok buildout?

Martijn Faassen faassen at startifact.com
Wed Jun 25 16:59:03 EDT 2008


Hey,

Toni Mueller wrote:
[snip]
> Mentioning them appropriately in buildout.cfg would be my
> preferred choice, as I also don't see how I could specify package
> versions within setup.py.

You can. All this is standard distutils/setuptools by the way, nothing 
Grok specific, or Zope specific, or even buildout specific. You simply 
add the version number:

install_requires = [
   'SQLAlchemy == 0.5beta1',
   ]

or something like:

install_requires = [
    'grok >= 0.13',
   ]

The drawback of hardcoding version numbers in setup.py is that it 
becomes harder to combine packages which may have different 
requirements, and that it becomes harder to just change to a bugfix 
release, etc. Still, I recommend this kind of thing for megrok 
extensions, as there's not really a better way to communicate this kind 
of information.

For applications, you can use buildout's versions feature to lock down 
versions. You leave them open in setup.py:

install_requires = [
  'SQLAlchemy',
  ]

[buildout]
versions = versions

[versions]
SQLAlchemy = 0.5beta1

Grok's own versions are managed in this way.

Since this is a clearly a source of confusion, someone should perhaps 
take this text and make a document out of it for grok.zope.org.

Regards,

Martijn



More information about the Grok-dev mailing list