[Pythonmac-SIG] What should be on sys.path for MacPython 2.3
Jack Jansen
Jack.Jansen@oratrix.com
Thu, 10 Apr 2003 23:15:33 +0200
Folks, I need some feedback on one of the last design issues for
MacPython 2.3. Here's the text of a bugreport I just filed (and
assigned to myself:-), please let me hear of any insight you have.
------------
On MacOSX sys.path needs to conform more to the platform standard, with
extensions (read: python packages) installed in multiple places
(per-user, per-machine, network-wide). We can probably ignore
network-wide for the time being, and per-machine is more-or-less
handled by Python's lib/site-packages, but per-user is needed.
Problem is that there are a number of reasonable places we could put
these user-extensions:
- ~/Library/Python - Perl seems to do it this way.
- ~/Library/Application Support/Python - Seems like a better location
- One of the above, with "site-packages" appended - allows for more
stuff in there, like IDE plugins, Package Manager packages, etc.
- One of the above, with $(VERSION)/site-packages appended - allows for
installation of multiple Python versions without the binary extension
modules getting in each others hair.
And only $(VERSION) isn't even good enough if this code also gets used
for non-framework Pythons, because extension modules aren't compatible
between framework and non-framework builds.
distutils should probably be aware of this convention, and if
site-packages isn't writable to the current user fallback to the
directory above (or at least give a warning explaining how to do this).
For completeness we could always add the user directory to sys.path,
and add the other two (/Library, /Network/Library) only if they exist.
--
- 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 -