Buildout: adding a download API?
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@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
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.
+1 Thanks! 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 -- Jim Fulton Zope Corporation
participants (2)
-
Jim Fulton
-
Thomas Lotze