
On Tue, May 09, 2000 at 11:15:05AM -0400, Fred L. Drake, Jr. wrote:
Gregor Hoffleit writes:
Btw, I think as a consequence even site.py should be moved from lib/python1.X to /etc.
Not site.py, but sitecustomize.py, which is where local modifications should go. This is *not* included in the distribution, so it not an installation problem, but the site-admin would need to create a .pth in the shared area that added some directory to sys.path (say, /etc/python/site-packages) so that individual host-admins could add packages locally. But this begs the question: in such an environment, would it generally make sense to support host-specific additions?
I think so. Currently the Debian package adds /usr/local/ directories to sys.path in site.py: "FOR DEBIAN, this sys.path is augmented with directories in /usr/local. Local addons go into /usr/local/lib/python<version>/site-packages (resp. /usr/local/lib/site-python), Debian addons install into /usr/lib/python<version>/site-packages." It's a question of Debian policy that things in /usr/local should override things in /usr, therefore I need to add these /usr/local/lib directories in front of their /usr/lib equivalents, e.g.
sys.path ['', '/usr/lib/python1.5/', '/usr/lib/python1.5/plat-linux2', '/usr/lib/python1.5/lib-tk', '/usr/lib/python1.5/lib-dynload', '/usr/local/lib/python1.5/site-packages', '/usr/local/lib/python1.5/site-packages/GMatH', '/usr/local/lib/site-python', '/usr/lib/python1.5/site-packages', '/usr/lib/site-python']
I think this is not possible using .pth files, nor with sitecustomize.py, therefore this was done in site.py. Now I guess I should include a .pth file in the Debian package so that something like /etc/python is appended to sys.path, and then the sysadmin should be educated to use /etc/python/sitecustomize.py to further modify the path. Or does anybody have a better solution here ? Gregor