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

SourceForge.net noreply@sourceforge.net
Thu, 10 Apr 2003 14:30:15 -0700


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

Category: Macintosh
Group: None
Status: Open
Resolution: None
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.

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

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