[Pythonmac-SIG] Added platform-specific directories to sys.path

Jack Jansen Jack.Jansen@oratrix.com
Fri, 19 Jul 2002 22:58:57 +0200


I've a question that I'd like some feedback on. On MacOSX 
there's a set of directories that are meant especially for 
storing extensions to applications, and there's requests on the 
pythonmac-sig that I add these directories to the Python search 
path. This could easily be done optionally, with a .pth file in 
site-python.

MacOSX has rationalized where preferences, libraries, licenses, 
extensions, etc are stored, and for all of these there's a 
hierarchy of folders. In the case of Python extension modules 
the logical places would be ~/Library/Application Support/Python 
(for user-installed extension modules), /Library/Application 
Support/Python (for machine-wide installed extension modules) 
and /Network/Library/Application Support/Python (for 
workgroup-wide installed modules). The final location, in 
/System, is for factory-installed stuff from Apple, not needed 
just yet for this example:-).

I sympathize with the idea of making things more conform to the 
platform standard, on the other hand I'm a bit reluctant to do 
things differently again from what other Pythons do. But, one of 
the things that is sorely missing from Python is a standard 
place to install per-user extension modules, so this might well 
be the thing that triggers inclusion of such functionality into 
the grand scheme of things (including distutils support, etc).
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- 
Emma Goldman -