[Python-Dev] Python and the Linux Standard Base (LSB)

glyph at divmod.com glyph at divmod.com
Wed Nov 29 11:18:26 CET 2006

On 09:34 am, jack.jansen at cwi.nl wrote:

>There's another standard place that is searched on MacOS: a per-user
>package directory ~/Library/Python/2.5/site-packages (the name "site-
>packages" is a misnomer, really). Standardising something here is
>less important than for vendor-packages (as the effect can easily be
>gotten by adding things to PYTHONPATH) but it has one advantage:
>distutils and such could be taught about it and provide an option to
>install either systemwide or for the current user only.

Yes, let's do that, please.  I've long been annoyed that site.py sets up a local user installation directory, a very useful feature, but _only_ on OS X.  I've long since promoted my personal hack to add a local user installation directory into a public project -- divmod's "Combinator" -- but it would definitely be preferable for Python to do something sane by default (and have setuptools et. al. support it).

I'd suggest using "~/.local/lib/pythonX.X/site-packages" for the "official" UNIX installation location, since it's what we're already using, and ~/.local seems like a convention being slowly adopted by GNOME and the like.  I don't know the cultural equivalent in Windows - "%USERPROFILE%\Application Data\PythonXX" maybe?

It would be nice if site.py would do this in the same place as it sets up the "darwin"-specific path, and to set that path as a module global, so packaging tools could use "site.userinstdir" or something.  Right now, if it's present, it's just some random entry on sys.path.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20061129/63ad3d9a/attachment.html 

More information about the Python-Dev mailing list