> When the builder installs the package (setup.py install --single- > version-externally-managed, and more specifically, setuptools' > install_lib command), __init__.py files are skipped, because they would > conflict if installed by multiple packages . Instead, setuptools' > install_egg_info command installs a *-nspkg.pth file that ensures that > the package exists -- if an __init__.py file exists, it is used, but if > not, a module is added to sys.modules, so imports work anyway. Since all > zope projects use setuptools, they don't need the __init__.py files.
Thanks, that info helped me find this: http://mail.python.org/pipermail/distutils-sig/2009-May/011730.html I made a test (attached), it fails without the __init__.py in the namespace package for me like this: ji...@ec2-staging:~/test_ns$ python test.py ji...@ec2-staging:~/test_ns$ sudo mv /usr/lib/python2.5/site-packages/zope/__init__.py* tmp/ ji...@ec2-staging:~/test_ns$ python2.5 test.py Traceback (most recent call last): File "test.py", line 1, in <module> import zope.testpackage ImportError: No module named testpackage ji...@ec2-staging:~/test_ns$ sudo mv tmp/__init__.py* /usr/lib/python2.5/site-packages/zope/ This test failed Debian Lenny and Squeeze machines for python 2.5 and 2.6. Could you check that the same occurs in Ubuntu? You need to extract the tarball in your home directory and have python-zope.interface and python-zope.event installed. P.S. The test is possibly destructive to the machine it runs on, so use one you don't care about. Unless we can get the above to work, I think we should not commit your patch. > I can add a virtual python-zope.app to some random package, because I > can't think of the most important zope.app.* library like zope.interface > is. But I would like to avoid depending on python-zope.app at all, > that's why I filed this bug. zope.app.publisher seems to have no zope.app.* dependencies and is pretty central. Failing that, I think there's a good argument for putting the virtual package for zope.app.* in either python-zope.interface or python-zope.event. ** Attachment added: "test_ns.tar.gz" https://bugs.launchpad.net/van.pydeb/+bug/619294/+attachment/1513321/+files/test_ns.tar.gz -- Do not add namespace packages to depends https://bugs.launchpad.net/bugs/619294 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs