[Distutils] Proper handling of PEP420 namespace packages with setuptools and pip
robertc at robertcollins.net
Wed Apr 22 12:38:41 CEST 2015
On 22 April 2015 at 22:13, Christoph Schmitt <dev-mailings at gongy.de> wrote:
> Hello again,
> since I haven't got any replies yet I'm trying to make myself a bit more
> precise now. I consider the behaviour described in my original posting a
> bug. I posted to this list because the setuptools docs say "Please use the
> distutils-sig mailing list  for questions and discussion about
> Test 3)
> DO NOT delcare namespace_packages=['coolpkg'] in setup.py of each project
> Result: all modules can be imported
This is correct AFAICT.
the setuptools namespace_packages thing predates PEP-420, and because
PEP-420 namespaces don't interoperate with .pth file based packages
(expecially when you get into interactions between system non-PEP-420
+ virtualenv PEP-420 packages!) changing this is super hard: you'll
guarantee to break many existing installs.
Perhaps there should be a new keyword, but since nothing is needed to
make things work, it seems like it would be rather redundant.
More information about the Distutils-SIG