Comment 4 for bug 659231

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

Looks to me that this is caused by http://bugs.python.org/setuptools/issue113

zope packages for Debian are built with --single-version-externally-managed flag that creates a *-nspkg.pth file, and skips the zope/__init__.py file. But, we later install the __init__.py file anyway (zope.interface does this). But the nspkg.pth file does not work when the __init__.py exists.

Part of that file reads:

... ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('zope',types.ModuleType('zope')) ...

if I delete "not ie" clause from zope.interface-*-nspkg.pth, this problem goes away, because then '/usr/lib/python2.6/dist-packages/zope' is added to sys.modules['zope'].__path__ and all zope.* packages are found.

However, the install_namespaces function in setuptools.commands.install_egg_info that generates the nspkg.pth files has not been changed since it was first introduced in 0.6b3...