[Distutils] easy_install unable to install from sourceforge?

oliver oliver.schoenborn at gmail.com
Sun Dec 18 20:39:03 CET 2011


On Sun, Dec 18, 2011 at 10:32 AM, Hartmut Goebel <h.goebel at goebel-consult.de
> wrote:

> **
> Am 18.12.2011 06:07, schrieb oliver:
>
>
>  Processing download
> error: Couldn't find a setup script in
> c:\docume~1\schoenb\locals~1\temp\easy_install-m52ynu\download
>
> Downloading
> http://sourceforge.net/projects/pubsub/files/pubsub/3.1.1b1/PyPubSub-3.1.1b1-py2.6.egg/download
>
>  The filename is "download", no .egg extension
>
> ...
> This *reall* issue is sourceforge adding a "/download" to the URL. I filed
> a bug a few years ago, but as expected, it has been ignored.
>
> Nevertheless I once wrote a script for handling this bug. I'll prepre a
> patch for easy_install when I find some time.
>
>
Thanks Hartmut, that would be awesome. There is some code in
package_index.py that attempts to handle it but maybe the issue is other
(btw the "Yuck" is not mine!):

def egg_info_for_url(url):
    scheme, server, path, parameters, query, fragment =
urlparse.urlparse(url)
    base = urllib2.unquote(path.split('/')[-1])
    if server=='sourceforge.net' and base=='download':    # XXX Yuck
        base = urllib2.unquote(path.split('/')[-2])
    if '#' in base: base, fragment = base.split('#',1)
    return base,fragment

Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20111218/c1599799/attachment.html>


More information about the Distutils-SIG mailing list