[Python-Dev] Draft PEP: "Simplified Package Layout and Partitioning"
P.J. Eby
pje at telecommunity.com
Wed Jul 20 16:55:04 CEST 2011
At 10:40 AM 7/20/2011 -0400, Neal Becker wrote:
>I wonder if this fixes the long-standing issue in OS vendor's
>distributions. In
>Fedora, for example, there is both arch-specific and non-arch directories:
>/usr/lib/python2.7 + /usr/lib64/python2.7, for example. Pure python
>goes into
>/usr/lib/python2.7, and code including binaries goes into
>/usr/lib64/python2.7.
>But if a package has both, it all has to go into
>/usr/lib64/python2.7, because
>the current loader can't find pieces in 2 different directories.
>
>You can't have both /usr/lib/python2.7/site-packages/foo and
>/usr/lib64/python2.7/site-packages/foo.
>
>So if this PEP will allow pieces of foo to be found in 2 different
>places, that
>would be helpful, IMO.
It's more of a long-term solution than a short-term one. In order
for it to work the way you want, 'foo' would need to have its main
code in foo.py rather than foo/__init__.py.
You could of course make that change on the author's behalf for your
distro, or remove it altogether if it doesn't contain any actual
code. However, if you're going to make changes, you could change its
__init__.py right now to append extra directories to the module
__path__... and that's something you can do right now.
More information about the Python-Dev
mailing list