[Distutils] distribute and buildout: best practices?

Tarek Ziadé ziade.tarek at gmail.com
Wed Oct 7 13:53:50 CEST 2009

On Wed, Oct 7, 2009 at 1:23 PM, Reinout van Rees <reinout at vanrees.org> wrote:
> What's the current best way to use both distribute and buildout?  Apart from
> the bootstrap + apparently needed change in buildout, I've got the following
> questions:
> - Do my libraries have to list a dependency on distribute or on setuptools?
>  Everything zopish has a 'setuptools >= 0.6c9' in it.  I tried putting
>  distribute in there, but I seemed to get less problems with leaving it at
>  setuptools.

No. Once we've resolved the problem you've mentioned in the hardcoded setuptools
dependency, you will have an empty Setuptools 0.6c9 egg in eggs/
so libs that ask for this dependency will  think it's met.

> - Should just globally installing distribute be enough?  Everything ought to
>  keep working.  It does lead to a bunch of runtime warnings in buildout,
>  however.  (But Tarek has targeted that problem for the upcoming 0.6.4 :-)

We still require a specific zc.buildout bootstrap.py, otherwise you
will have a local
setuptools egg that will override any global installation.

> - Do I need to change buildout's bootstrap already? Doing that tries to change
>  my global setuptools, for which you need to sudo.  And it also forces
>  everyone else using that buildout to switch (which in itself is OK).

It shouldn't touch anything outside your buildout, please try with the latest
one at buildout-distribute at bitbucket.

> - From my experiments (not exhaustive! no real debugging!) it seems that the
>  only safe way is to first install distribute globally before touching a
>  buildout that brings in distribute.  Is this to be expected?

The Distribute installation will try to patch any setuptools found in
the path so it doesn't

In a buildout environment, if it changes anything globally, it's a bug of our
patching code and not intended, unless your buildout environment,
somehow, uses a global
setuptools. But I don't think this can happen.

Tarek Ziadé | http://ziade.org | オープンソースはすごい! | 开源传万世,因有你参与

More information about the Distutils-SIG mailing list