In article <5a0e2490-a743-4729-a752-d94524ea9...@barrys-emacs.org>,
 Barry Scott <ba...@barrys-emacs.org> wrote:
> On my Mac OS X 10.7.3 System I have lots of python kits installed for 
> developing extensions.
> 
> I'll just noticed that Python.org 2.7.2 uses the sames site-packages folder 
> with Apple's
> 2.7.1.
> 
> Since extensions compiled against Apple's 2.7.1 segv when used by 
> python.org's 2.7.2
> this is at least unfortunate.
> 
> Here is the what is in sys.path for both versions. Notice 
> /Library/Python/2.7/site-packages
> is in both.

That directory is in the default sys.path for both the Apple-supplied 
Python 2.7 in Lion and for the python.org Python 2.7's but that doesn't 
mean both versions use the same site-packages directory:

$ /usr/bin/python2.7 -c "import distutils.sysconfig; \
        print(distutils.sysconfig.get_python_lib())"
/Library/Python/2.7/site-packages

$ /usr/local/bin/python2.7 -c "import distutils.sysconfig; \
        print(distutils.sysconfig.get_python_lib())"
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pack
ages

That means that, by default, packages installed by Distutils-based 
installs (setup.py, easy_install, pip, et al) will be installed to the 
corresponding directory for each version.

The python.org OS X Pythons (and built-from-source framework builds) add 
the Apple-specific directory to the search path in order to allow 
sharing of installed third-party packages between the two.  The feature 
was added in 2.7 and 3.1+ and tracked in Issue4865 
(http://bugs.python.org/issue4865).  Please open a new issue on the 
tracker if you have examples of how this is causing problems.  Thanks.

-- 
 Ned Deily,
 n...@acm.org

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to