[Distutils] [PATCH] Letting distribute try different download URLs

Asheesh Laroia lists at asheesh.org
Thu Aug 18 17:34:06 CEST 2011

Hi all,

I have a very real-world problem I'm hitting with distribute, and I'm
proposing a patch.

Right now, PyPI points to a tar.gz for the 'nose' package that returns

    Searching for nose==1.0.0
    Reading http://pypi.python.org/simple/nose/
    Reading http://somethingaboutorange.com/mrl/projects/nose/
    Reading http://readthedocs.org/docs/nose/
    Best match: nose 1.0.0
    Downloading http://somethingaboutorange.com/mrl/projects/nose/nose-1.0.0.tar.gz
    error: Can't download http://somethingaboutorange.com/mrl/projects/nose/nose-1.0.0.tar.gz: 404 Not Found

I propose that if distribute hits a HTTP error like this, it keeps looping and
tries the next available tar.gz for nose. In my case, I think it then succeed
because I have dependency_links in my setup() call (in my setup.py) that point
to where I have been stashing copies of my own dependencies:


So I propose this patch. It is pretty straightforward. I hope that you accept
it, and if not, that you explain why.

I have re-run the test suite after the addition of my patch, and it does not
break any existing tests.

-- Asheesh.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distribute-patch-to-try-other-urls.patch
Type: application/octet-stream
Size: 1648 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20110818/8e549217/attachment.obj>

More information about the Distutils-SIG mailing list