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

Barry Warsaw barry at python.org
Fri Apr 24 01:38:50 CEST 2015


On Apr 22, 2015, at 02:25 PM, Chris Barker wrote:

>That's it. Done. Now all we need is a way to install these things -- well
>that's easy, each sub-package installs itself just like it would, maybe
>overwriting the top level directory name and the __init__.py, if another
>sub-package has already installed it.

This gets at the heart of the motivation for PEP 420, at least for me with my
distro-developer hat on.  Any single file can only be owned by exactly one
distro-level package.

So take the zope.* packages.  Which distro package owns zope/__init__.py when
you have zope.interfaces, zope.component, etc.?  The answer is, none can,
because you have no idea which one will be installed first.

Distros had to go through a lot of hackery to make this work, but now, we can
just delete zope/__init__.py from *all* distro packages (at least for the
Python 3 versions) and it will just work.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150423/de168357/attachment.sig>


More information about the Distutils-SIG mailing list