[PATCH] Letting distribute try different download URLs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Letting distribute try different download URLs

Asheesh Laroia-15
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:

   http://linode.openhatch.org/~paulproteus/

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.

_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig

distribute-patch-to-try-other-urls.patch (2K) Download Attachment