[Distutils] Buildout: adding a download API?

Thomas Lotze tl at gocept.com
Tue May 12 16:53:23 CEST 2009


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.

Viele Grüße,
Thomas

-- 
Thomas Lotze · tl at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20090512/8ce42d35/attachment.pgp>


More information about the Distutils-SIG mailing list