[Catalog-sig] Standardized way of getting to a package download URL in Cheeseshop

Grig Gheorghiu grig at gheorghiu.net
Wed Nov 9 23:02:55 CET 2005


--- "Martin v. Löwis" <martin at v.loewis.de> wrote:

> Grig Gheorghiu wrote:
> > It would be nice if there was a standardized way to get to a
> download
> > URL for a given package listed at the Cheeseshop. Currently some
> > packages are hosted there, some are hosted elsewhere, but in any
> case
> > one would think that a pointer to the full URL for the package file
> > could be kept on the Cheeseshop page for that package and made
> > available via an API.
> 
> The challenge here is that for packages with no downloadable files,
> it is difficult to infer a URL from the metadata. There is a download
> URL, but it is imprecise, as there is only a single one, not multiple
> download URLs depending on type of package to download.
> 
> So different packages use different strategies, such as only
> giving the base URL, and expecting the user to actually read
> the page at the download URL to understand where the package
> proper is available.
> 

You're right, I can see how it would be more difficult to keep track of
multiple download URLs per package, one for each type of package such
as .tgz, .zip etc. 

The situation is also made more difficult by the fact that some
packages are hosted at Source Forge, which means that their download
URL is picked up dynamically based on user preferences for the mirrors.

Unfortunately this means that automating the process of downloading a
package is hard or impossible, unless you do nasty tricks such as Web
page scraping. I was hoping that PyPI can emulate the CPAN
functionality. Obviously one brute force way of doing it would be to
force package authors to upload the latest version of their package to
PyPI and provide several download URLs, one per package type. 

> > I'd volunteer to start this ball rolling if nobody else has been
> > working on it. What is the procedure for contributing to the PyPI
> > project?
> 
> Depends on the nature of the change you propose: for a change
> in the meta-data, you need to write a PEP, and provide patches to
> distutils.

I'll have to give more thought to this, but I still think it would be a
worthy addition to the PyPI functionality.

Grig



More information about the Catalog-sig mailing list