On Mon, Apr 14, 2008 at 08:59:32PM +0200, Jan Matejek wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Barry Warsaw napsal(a): | On Apr 13, 2008, at 8:04 AM, Gael Varoquaux wrote: |> On Sun, Apr 13, 2008 at 07:59:21AM -0400, Barry Warsaw wrote: |>> On Apr 12, 2008, at 9:41 PM, Stephen Waterbury wrote: |>>> I used to always set up my own Python[s] in /usr/local |>>> and put that first in my PATH, but I have gotten lazy lately, and |>>> sometimes it will bite me. ;) |>> On Debian and derivatives (e.g. Ubuntu) you might have even more fun. |>> They put /usr/local/lib/pythonX.Y/site-packages on the sys.path *of |>> the system python*! This means that you can break your system Python |>> by installing a version of Python from source and then distutil'ing |>> things into there. Astoundingly, this is promoted as a feature. |> I want it like that. You are confusing /opt and /usr/local. | |> This is the way I expect things to work. I do not want to install my |> own |> packages in "/usr/lib/pythonX.Y/site-packages". This is for apt to |> deal |> with, not for me. | | Actually, the solution that I believe is a good compromise is to find | some other path in /usr/local to augment the system Python's sys.path | with. All I'm saying is that Python itself uses /usr/local/lib/ | pythonX.Y/site-packages as the default from-source path, so if Debian | wants a /usr/local path, it can pick some other subdirectory path and | still meet its goals. BTW, I believe Debian is unique here. I talked | to the Fedora guys and I've talked to a few Gentoo guys and both | seemed surprised by Debian's policy here.
Actually, openSUSE does this too, and i've even gone as far as making distutils install into /usr/local by default. Several reasons to do this: a) FHS says, "user installed apps go into /usr/local, period" b) the user should have a clean site-packages directory for his needs c) we don't want the user to mess with package-managed modules in /usr
and finally, the reason i'm not very happy to "pick some other subdirectory path": d) it is simple to tell distutils that default prefix is /usr/local. It is complicated and ugly to tell it that by default it should go to /usr/local/some-directory-of-my-own, and still be able to revert to system-ish installation by supplying --prefix=/usr (following the same semantics that autoconf/automake is using).
I entirely agree with this (from Debian's POV). This is the way many things in the system works, you install shared libraries to /usr/local/lib etc. I think Python needs 3 clear site-packges directories: 1) system 2) local-admin 3) user. Personally I'd like to see PEP 370, which is trying to introduce 3) above, move in that direction. No idea how I go about that though. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org