Hello, I've just discovered there is a little-known feature in site.py: if a $PREFIX/lib/site-python exists (e.g. /usr/lib/site-python), it is added to sys.path in addition to the versioned site-packages. But only under Unix ("if os.sep == '/'"). Has anyone seen that feature in the real world? Debian doesn't use site-python, but its own /usr/share/pyshared. For the record, it was added in b53347c8260e with the following commit message: user: Guido van Rossum <guido@python.org> date: Wed Sep 03 21:41:30 1997 +0000 files: Lib/site.py description: Give in to Mike Meyer -- add *both* lib/python1.5/packages and lib/site-python to the path (if they exist). This is a reasonable compromise. Regards Antoine.
On Wed, Oct 23, 2013 at 2:46 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Hello,
I've just discovered there is a little-known feature in site.py: if a $PREFIX/lib/site-python exists (e.g. /usr/lib/site-python), it is added to sys.path in addition to the versioned site-packages. But only under Unix ("if os.sep == '/'").
Has anyone seen that feature in the real world? Debian doesn't use site-python, but its own /usr/share/pyshared.
For the record, it was added in b53347c8260e with the following commit message:
user: Guido van Rossum <guido@python.org> date: Wed Sep 03 21:41:30 1997 +0000 files: Lib/site.py description: Give in to Mike Meyer -- add *both* lib/python1.5/packages and lib/site-python to the path (if they exist). This is a reasonable compromise.
Wow, a blast from the past. I don't see python-dev archives from those times but I'm sure there must have been discussion about whether site-packages were shareable between Python versions. I think history has shown that it's better to install them per version, so I suggest that we remove that feature. (People who want it can always patch up their own $PYTHONPATH.) -- --Guido van Rossum (python.org/~guido)
participants (2)
-
Antoine Pitrou
-
Guido van Rossum