Problem with .pth files under linux
Fernando PĂ©rez
fperez528 at yahoo.com
Tue Nov 13 18:24:52 EST 2001
Prabhu Ramachandran wrote:
> Hmm. This is the reason why Debian as a Linux distro rocks. Debian
> modifies site.py so that it also searches in
> /usr/local/lib/pythonX.Y/site-packages !! It does this by modifying
> site.py slightly like so:
>
> Original site.py:
>
> prefixes = [sys.prefix]
> if sys.exec_prefix != sys.prefix:
> prefixes.append(sys.exec_prefix)
>
> Debian's version:
>
> prefixes = [os.path.join(sys.prefix, "local"), sys.prefix]
> if sys.exec_prefix != sys.prefix:
> prefixes.append(os.path.join(sys.exec_prefix, "local"))
> prefixes.append(sys.exec_prefix)
>
>
> Obviously very thoughtful, correct and convenient. :)
And furthermore, something that should be part of Python itself!!! Great for
Debian users, but this is basically a micro-bug in Python, and it should be
fixed at the source.
>
> Another work around in your case would be to stick your Numeric.pth
> alone (with an absolute path) inside /usr/lib/pythonX.Y/site-packages.
>
> Nnumeric.pth:
> /usr/local/lib/pythonX.Y/site-packages/Numeric
>
Nah. I'd have to do that for a bunch of stuff. My current solution is kludgy
but automatic, since I don't need that site-python directory.
Anyway, this is more annoying and more work than it should.
Cheers, and thanks for all your help.
f.
More information about the Python-list
mailing list