Buildout -- Software for automating application assembly

Buildout should use pypi mirrors if pypi goes down

Reported by Jonas Obrist on 2011-02-18
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Buildout
Wishlist
Unassigned

Bug Description

Pypi goes down every once in a while, that's a fact.
Buildout dies if pypi is down and leaves your workspace in a broken state.
There's an easy (in theory) fix for this: Use the Pypi mirrors (http://b.pypi.python.org/simple, http://c.pypi.python.org/simple, http://d.pypi.python.org/simple, http://e.pypi.python.org/simple)!

Both bootstrap and buildout should fall back to the mirrors should the main server not be available!

Being able to change the index in a global config file is not really that useful, since the buildout might run automated (CI for example) and there's noone to switch the index from pypi to a mirror then.

Jonas Obrist (ojiidotch) wrote :

Here's an example how to make bootstrap.py work:

https://gist.github.com/833553

Rafael Monnerat (rafael-nexedi) wrote :

I'm quite interested in this topic.

I think the smarter selection should be part of zc.buildout itself, and not only for bootstrapping. ie.: If index is not defined, select a mirror that works dynamically.

You can be also a bit clever to detect mirrors, using pypi API, maybe you can get inspiration from pip implementation:

 - https://bitbucket.org/ianb/pip/src/8b6c6fccf0f1/pip/index.py

By using this API

    >>> from pip.index import get_mirrors
    >>> get_mirrors()
    ['a.pypi.python.org', 'b.pypi.python.org', 'c.pypi.python.org',
    'd.pypi.python.org']

Changed in zc.buildout:
importance: Undecided → Wishlist
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers