[Python-bugs-list] [ python-Bugs-719297 ] sys.path on MacOSX

SourceForge.net noreply@sourceforge.net
Tue, 22 Apr 2003 06:46:13 -0700


Bugs item #719297, was opened at 2003-04-10 23:30
Message generated for change (Comment added) made by jackjansen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=719297&group_id=5470

Category: Macintosh
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: sys.path on MacOSX

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Jack Jansen (jackjansen)
Date: 2003-04-22 15:46

Message:
Logged In: YES 
user_id=45365

Implemented in site.py ref. 1.49, for per-user only: ~/Library/Python/2.3/
site-packages is added to sys.path.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=719297&group_id=5470