[Distutils] Buildout: adding a download API?

Jim Fulton jim at zope.com
Tue May 12 19:36:31 CEST 2009

On May 12, 2009, at 10:53 AM, Thomas Lotze wrote:

> Buildout as well as a number of buildout recipes need to download  
> files
> from the net. They need to take care of doing the actual download,
> using the download cache and honouring the offline option. A couple of
> years ago, we also wrote the gocept.download recipe that does all that
> as well as MD5 checks and some other stuff.
> In order to simplify this situatin, we propose adding a download API  
> to
> buildout itself. A function like this:
> def download(url, use_cache=True, md5sum=None)
>    ...
>    return filename
> might be sufficient to remove the download logic from recipes and make
> optional checksum testing available without needing to depend on a
> separate download recipe.
> As a consequence, zc.recipe.cmmi would be able to do MD5 checks, which
> would basically make gocept.cmmi redundant. Using gocept.download's
> capabilities is the one feature of it which still currently keeps us
> from dropping it in favour of zc.recipe.cmmi.
> If there's no objection against a download API being added to  
> buildout,
> we'd like to implement one soon.
> Otherwise, we'd propose implementing MD5 testing in zc.recipe.cmmi
> since we consider it a good thing to reduce the zoo of cmmi-related
> recipes. We do think that a reusable API would be the better choice,
> though.



You should add a "namespace" option to the api.  Right now we have at  
least 2 namespaces,
dist and cmmi. (My download cache has a "minitage" directory. I wonder  
where that came from. :)


Jim Fulton
Zope Corporation

More information about the Distutils-SIG mailing list