[Distutils] Beta release of zc.buildout 1.5.0

Gary Poster gary.poster at canonical.com
Fri Apr 30 19:49:21 CEST 2010


On Apr 30, 2010, at 11:16 AM, Jonathan Ballet wrote:

> Hi,
> 
> On Thu, 29 Apr 2010 22:28:33 -0400, Gary Poster
> <gary.poster at canonical.com>
> wrote:
>> I have made a beta release of zc.buildout 1.5.0. 
>> 
>> Among other changes, this release includes the ability to use
> zc.buildout
>> with a system Python, if you use the new z3c.recipe.scripts instead of
>> zc.recipe.egg for generating scripts.
>> 
>> Changelog:
>> 
>> http://pypi.python.org/pypi/zc.buildout/1.5.0b1#b1-2010-04-29
> 
> Additional comments, with respects to the mail of Chris McDonough (I hit
> the same kind of issues).
> 
> 
> 1. It looks like something has changed in the way bootstrap run, in
> relation to the "buildout:index" value in buildout.cfg. Here, we use an
> internal Pypi index, which points to a list of *our* packages, and so, the
> value of "buildout:index" refers to this server.
> However, it seems now that bootstrap take this value to look for
> setuptools/distribute packages while bootstrapping. In our configuration,
> this fails with the following error:
> 
> $ python bootstrap.py 
> Creating directory '/home/jon/projects/sa/repos/unstable/sact.dbapi/bin'.
> Creating directory
> '/home/jon/projects/sa/repos/unstable/sact.dbapi/parts'.
> Creating directory '/home/jon/projects/sa/repos/unstable/sact.dbapi/eggs'.
> Creating directory
> '/home/jon/projects/sa/repos/unstable/sact.dbapi/develop-eggs'.
> Couldn't find index page for 'distribute' (maybe misspelled?)
> Getting distribution for 'distribute'.
> While:
>  Bootstrapping.
>  Getting distribution for 'distribute'.
> Error: Couldn't find a distribution for 'distribute'.
> 
> .. since our server doesn't contain this package.
> If I create a ~/.pydistutils.cfg, with "easy_install:index-url" value to
> the official Pypi, everything goes fine (bootstrap + buildout).

Yes, this is the result of the new feature listed in the changes file for bootstrap.py: "The buildout script generated by bootstrap honors more of the settings in the designated configuration file (e.g., buildout.cfg)."  This matched our desire: for instance, if we want to use our own index to manage the packages needed to build out software , that should include zc.buildout.

When an earlier version of bootstrap did not honor the config file, I was surprised, so I felt this was an improvement, and perhaps even arguably a bugfix.

I'd like to hear input on whether this change should be reverted.  I prefer it, and for the particular instance you describe I'd suggest that you keep zc.buildout and your other dependencies on your own server if you already have that infrastructure, but...I won't push back too hard if folks disagree.

> 2. In the previous point, I omitted to say that we are using an old
> bootstrap.py, a little bit customized (with a dirty hack which gets
> ez_setup.py on our internal server (sounds familiar? ;))

heh :-)

> I tried to use the latest bootstrap.py, and I ran into the same problem as
> Chris, since my Python executable was from a Virtualenv.
> 
> I dig a little bit into the problem, and it looks like the -S option
> bootstrap.py passes to Python executable if it detects that it runs from a
> non-isolated environment causes this problem. In fact, Virtualenv currently
> only copies (with symlinks) some of the stdlib modules into its environment
> (I'm not sure why specifically those), and also add the global stdlib
> directory into sys.path.
> However, running Virtualenv's Python with the -S remove the global stdlib
> from the sys.path! (in particular, it removes /usr/lib/python2.5 on my
> machine):
> 
> I'm not sure this could help, but this was just a sharing of what I found.

Yes, thank you.  As I confirmed in another thread, this is exactly the problem.  I didn't understand the importance of what you wrote until I saw it myself.

> Despite those problems, I'm eager to test further this new release of
> Buildout, thanks for your work!

Thank you for your feedback.

Gary



More information about the Distutils-SIG mailing list