"namespace" vs "module" packages (was Re: [Zope3-dev] packaging conventions note)

Barry A. Warsaw barry@zope.com
Sat, 14 Dec 2002 09:18:41 -0500


>>>>> "JF" == Jim Fulton <jim@zope.com> writes:

    JF> Namespace packages should not export any names from their
    JF> __init__ modules.

That's a nice distinction, if it can work in practice.
    
    JF> It should be possible to distribute sub-packages or submodules
    JF> of these independently.  I would even say that namespace
    JF> packages should allow themselves to be spread over multiple
    JF> physical locations.  For example, I want the zope and
    JF> zopeproducts packages to have an __init__ that arranges for
    JF> all zope and zopeproducts directories found on the Python path
    JF> to be added to the respective package paths,

That would solve the problem of having to make sure all the
subpackages have the same (or at least non-conflicting)
__init__.py's.  Jim said in a previous message that that would be
manageable, but if those namespace package __init__.py's have any
significant code at all, I would disagree.  Look at something like the
proliferation of test.py's.

So what kind of infrastructure are you thinking about to allow
super-packages like zope and zopeproducts to have components spread
around the file system?

-Barry