On Mon, Mar 24, 2014 at 6:09 PM, Barry Warsaw <barry@python.org> wrote:
On Mar 24, 2014, at 05:53 PM, Donald Stufft wrote:

>See also https://github.com/pypa/pip/issues/3

Hah, yeah.  I didn't realize --single-version-externally-managed is implied by
--root, and in fact our Debian build scripts often (either explicitly or
implicitly) define --root, as is the case in lazr.uri.

>Basically prior to PEP420 namespace packages were bad and using them results
>in pain sooner or later :( I’m not sure if a good solution yet, perhaps we
>can backport PEP420 to PyPI and have namespace packages depend on that?

Or maybe do a version check before installing this file?  Python 3.3 and newer
will have PEP 420 support, and this file makes no sense in that case.

That won't *quite* work, because the .pth files are generated for other types of direct-install distributions.

I think the correct fix would be to change the nspkg.pth magic to check for PEP 420 support, but unfortunately it seems we may have to use version checking: on rereading PEP 420 I see there's no 'sys.namespace_packages' or similar object that can be directly checked for feature support.  :-(