[Distutils] zc.buildout 'extends' options

Jim Fulton jim at zope.com
Wed Jan 21 16:18:59 CET 2009


On Jan 17, 2009, at 6:56 AM, Martin Aspeli wrote:

> Hi Jim & co,
>
> Plone 3.2 currently distributes its packages as eggs, and people use  
> an 'extends' option with a remote URL to get a known good set for  
> each version, e.g.:
>
> [buildout]
> extends = http://dist.plone.org/release/3.2/versions.cfg
>
> This is similar to how Grok does its distributions, of course.
>
> Now, as far as I can tell, this doesn't work offline. -o mode does  
> not complain, but if you're totally offline (turn off your network  
> interface), then urllib throws an error when buildout tries to  
> evaluate the 'extends' option, and buildout crashes completely.
>
> I'd like to have an optional download cache directory, e.g.
>
> [buildout]
> extends-cache = extends-cache-directory
> extends = http://dist.plone.org/release/3.2/versions.cfg
>
> In offline mode, buildout would look for the file to extend  
> (probably with some hash of the url used as filename) in the  
> directory specified by extends-cache.
>
> This would allow full offline mode (e.g. on a machine with no  
> network card configured). In particular, it would allow Plone's  
> buildout-based installers to ship with the versions.cfg file and not  
> require people to be able to download them.
>
> Is this desirable?

I think so.  I have a nagging concern that this might be better  
handled at a lower level, but having buildout aware of the caching  
means that zc.sourcerelease would also be able to take advantage of  
it, so, for example, you could build a source release from a buildout  
that used remote configuration.

> Any plans for such a feature?

Not yet. :)

> Would you accept a patch, if we could make it work?


Sure, assuming that it included tests.  Also, rather than a patch, I'd  
prefer a development branch if you have access to the zope.org  
repository.

Jim

--
Jim Fulton
Zope Corporation




More information about the Distutils-SIG mailing list