Search code examples
pythonbuildoutpypi

What index is buildout really using?


I'm trying to install couchdbkit using following buildout config:

[buildout]
parts = eggs
include-site-packages = false
versions = versions

[eggs]
recipe = zc.recipe.egg:eggs
eggs =
    couchdbkit

[versions]
couchdbkit = 0.6.3

It installs package successfully but I get numerous errors like this during setup on some machines:

Download error on http://hg.e-engura.org/couchdbkit/: [Errno -2] Name or service not known -- Some packages may not be found!

Be default buildout should find packages using this index. But I can't understand source of this weird hostname. Nothing here points to this location.

How does it actually work?


Solution

  • The underlying setuptools code also scans for homepage and download links from the simple index and does this quite aggressively.

    The couchdbkit setup.py file lists http://hg.e-engura.org/couchdbkit/ as the homepage, so all homepage links on the simple index link there.

    You can prevent zc.buildout from trying to connect to that host by setting up a whitelist of hosts it can connect to:

    [buildout]
    # ...
    
    allow-hosts =
       *.python.org
       *.google.com
       *.googlecode.com
       *.sourceforge.net
    

    for example.