[PEAK] Downloading via redirection

Yang qp10sxo02 at sneakemail.com
Fri Mar 23 16:13:03 EDT 2007


Hi all, easy_install is a fantastic tool, but for some reason it
doesn't seem to handle HTTP redirects. I'm using setuptools 0.6c5 (the
default for FC5).

Example: I have a PHP script at:

http://assorted.sf.net/python-commons/download/index.php

It consists solely of:

<?php
header('Location:
http://downloads.sourceforge.net/assorted/python-commons-0.1.tgz?use_mirror=umn&filesize=23840');
?>

If I set my package's download URL to that first URL, easy_install
fails to download the package:

Creating /export/home/yz/here/site.py
Searching for python-commons
Reading http://cheeseshop.python.org/pypi/python-commons/
Reading http://assorted.sourceforge.net/python-commons
Reading http://assorted.sourceforge.net/python-commons/download
Reading http://cheeseshop.python.org/pypi/python-commons/0.1
No local packages or download links found for python-commons
error: Could not find suitable distribution for
Requirement.parse('python-commons')

However, setting the download URL to the second URL works:

Creating /export/home/yz/here/site.py
Searching for python-commons
Reading http://cheeseshop.python.org/pypi/python-commons/
Reading http://assorted.sourceforge.net/python-commons
Reading http://cheeseshop.python.org/pypi/python-commons/0.1
Best match: python-commons 0.1
Downloading http://downloads.sourceforge.net/assorted/python-commons-0.1.tgz?use_mirror=umn&amp;filesize=23840
Processing python-commons-0.1.tgz
Running python-commons/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-QmsNYV/python-commons/egg-dist-tmp-lI_b6m
...

Would you consider adding redirection support?

Thanks in advance!

Yang



More information about the PEAK mailing list