[Python-ideas] problems with import
Peter Otten
__peter__ at web.de
Fri Jun 27 15:34:48 CEST 2014
Neal Becker wrote:
> One problem I often encounter is with import search.
>
> An example of the problem is with the package mercurial. It has
> extensions in a subdirectory called 'hgext'.
>
> On fedora, I install mercurial using the vendor package. This creates
>
> /usr/lib64/python2.7/site-packages/hgext/
>
> Later, I want to try out an extension as a non-privileged user.
>
> cd <extension>
> python setup.py install --user
>
> Now I also have
> ~/.local/lib/python2.7/site-packages/hgext
>
> but python won't search there for extensions. Once if finds the system
> hgext directory, it won't look also in the local one.
>
> Any thoughts?
Isn't that addressed with "PEP 420 -- Implicit Namespace Packages?
http://legacy.python.org/dev/peps/pep-0420/
More information about the Python-ideas
mailing list