[PEAK] Downloading via redirection

Yang qp10sxo02 at sneakemail.com
Fri Mar 23 20:58:58 EDT 2007


On 3/23/07, Phillip J. Eby pje-at-telecommunity.com |python-peak|
<...> wrote:
> At 04:13 PM 3/23/2007 -0400, Yang wrote:
> >Hi all, easy_install is a fantastic tool, but for some reason it
> >doesn't seem to handle HTTP redirects.
>
> It handles redirects just fine:
>
> $ easy_install http://assorted.sf.net/python-commons/download/index.php
> Downloading http://assorted.sf.net/python-commons/download/index.php
> Processing index.php
> Running python-commons-0.1\setup.py -q bdist_egg --dist-dir
> c:\docume~1\pje-2\locals~1\temp\easy_install-pirq-9\python-commons-0.1\egg-dist-tmp-7wkbqu
> Adding python-commons 0.1 to easy-install.pth file
>
> Installed
> c:\cygwin\home\pje\c6\chandler\release\bin\lib\site-packages\python_commons-0.1-py2.5.egg
> Processing dependencies for python-commons==0.1
> Finished processing dependencies for python-commons==0.1
>
>
> However, it *doesn't* have aby way of knowing that 'index.php' is in fact
> 'python-commons-0.1.tgz', when it sees it mentioned in a link on a web
> page.  If you want it to be able to know this, you need to add
> '#egg=python_commons-0.1' to the end of your link, e.g.:

But when easy_install requests
http://assorted.sf.net/python-commons/download/ (which it apparently
does, based on the output), won't the HTTP response inform it of the
filename and type (and thus it can see that it's downloading
python-commons-0.1.tar.gz)?

>
> http://assorted.sf.net/python-commons/download/index.php#egg=python_commons-0.1
>
> This will be recognized as what it is: a download link for the source of
> python-commons.
>
>
> >Would you consider adding redirection support?
>
> No, since it's already there.  :)
>
>



More information about the PEAK mailing list