Issue 719297: sys.path on MacOSX (original) (raw)

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:

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.