[Distutils] Proper handling of PEP420 namespace packages with setuptools and pip

Wichert Akkerman wichert at wiggy.net
Wed Apr 22 14:18:07 CEST 2015


On Wed, Apr 22, 2015 at 12:38 PM, Robert Collins <robertc at robertcollins.net>
wrote:

> 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 [3] 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.
>

If I remember things correctly I tried that a while ago, but it resulted in
setuptools generating an sdist without any of the namespace packages.

 Wichert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150422/c5d46957/attachment.html>


More information about the Distutils-SIG mailing list