Re: PEP 420: Implicit Namespace Packages
PJ Eby <[email protected]>
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CALeMXf61w4Vn9P+LgGXGg+r8L9xfXDcLHCSkHFVMEw=m983rDw@mail.gmail.com> |
On Sun, Apr 22, 2012 at 7:51 PM, Michael Foord <[email protected]> wrote: > > > On 19 April 2012 21:18, Eric V. Smith <[email protected]> wrote: > >> This reflects (I hope!) the discussions at PyCon. My plan is to produce >> an implementation based on the importlib code, and then flush out pieces >> of the PEP. >> >> In particular, I want to make sure the PEP addresses the various >> objections that were raised, especially by Nick. >> >> > So a namespace package is a directory (tree) on sys.path. For a standard > Python install how will these be installed? > > If you need to install "foo.bar" and "foo.baz" will distutils and > packaging do the right thing? (And what specifically is the right thing for > Python's own package management tools - merging the namespace packages or > keeping them separate somehow?) > I don't know about 3.x distutils or packaging specifically, but I do know that 2.x distutils will install packages compatibly with this approach if you list the child packages but NOT the namespace package in your setup.py. So if one distribution lists 'foo.bar' and the other lists 'foo.baz', but *neither* lists 'foo', then the subpackages will be installed without a foo/__init__.py, and that will make it work. If packaging and 3.x distutils inherit this behavior from the 2.x distutils, then that would be the simplest way to do it. (And if you install to different directories, the parts will get merged.) _______________________________________________ Import-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/import-sig