Re: [Distutils] nspkg.pth files break $PYTHONPATH overrides
PJ Eby <[email protected]> Tue, 25 Mar 2014 15:35:57 -0400
| Newsgroups | gmane.comp.python.import,gmane.comp.python.distutils.devel |
|---|---|
| Message-ID | <CALeMXf4yznp2KYuhD7DakCkEj=KWSYm6L62sGKzTwSL-YcNMxg@mail.gmail.com> |
On Mon, Mar 24, 2014 at 6:09 PM, Barry Warsaw <[email protected]> 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. :-( _______________________________________________ Import-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/import-sig