[Distutils] namespace packages broken in ubuntu with zc.buildout 1.5?

Wichert Akkerman wichert at wiggy.net
Thu Apr 12 12:16:22 CEST 2012

I am running into something very odd on an Ubuntu 11.10 system: it looks 
like namespace packages are entirely broken there. Here is a pdb session 
to demonstrate:

(Pdb) import repoze
(Pdb) repoze
<module 'repoze' from 
(Pdb) repoze.__path__

So at this point I can import the repoze namespace packages, which is 
defined by both repoze.sphinx.autointerface and repoze.formapi. Now I 
try to import repoze.sphinx.autointerface:

(Pdb) import repoze.sphinx.autointerface
*** ImportError: No module named autointerface

That is unexpected since we saw the repoze.sphinx.autointerface egg was 
found earlier. So lets look at repoze.sphinx:

(Pdb) repoze.sphinx
<module 'repoze.sphinx' from 

I did not see that coming at all: how can a system sphinx package that 
is not inside the repoze namespace suddenly appear there? This is 
especially odd since buildout hooked me up with a sphinx package in the 
buildout itself:

(Pdb) import sphinx
<module 'sphinx' from 

I am not sure who is responsible for this behaviour or how to debug 
this. Does anyone have any useful hints?


More information about the Distutils-SIG mailing list