Fred Drake wrote:
On May 3, 2008, at 7:51 AM, [EMAIL PROTECTED] wrote:
Fred asked for a --prefix flag (which is what I was voting on). I don't
really care what you do by default as long as you give me a way to do it
differently.
What's most interesting (to me) is that no one's commented on my note
that my preferred approach would be that there's no default at all; the
location would have to be specified explicitly. Whether on the command
line or in the distutils configuration doesn't matter, but explicitness
should be required.
I thought Christian said something about that defeating one of the main
points of the PEP - to allow per-user installation of modules to "just
work" for non-administrators. (It may not have been Christian, and it
may not have been directly in response to you, but I'm pretty sure I
read it somewhere in this thread ;)
Anyway, a per-user site-packages directly only "just works" if the
standard behaviour of a Python installation is to provide access to the
per-user packages without requiring any additional action on the part of
the user.
A couple of paragraphs in the PEP may also be of interest to you:
"""For security reasons the user site directory is not added to sys.path
when the effective user id or group id is not equal to the process uid /
gid [9]. It's an additional barrier against code injection into suid
apps. However Python suid scripts must always use the -E and -s option
or users can sneak in their own code.
The user site directory can be suppressed with a new option -s or the
environment variable PYTHONNOUSERSITE. The feature can be disabled
globally by setting site.ENABLE_USER_SITE to the value False. It must be
set by editing site.py. It can't be altered in sitecustomize.py or later."""
So Python itself turns the feature off automatically for invocation via
sudo and the like, and the sysadmin can disable the feature completely
through site.py.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com