homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Sharing site-packages between Apple and python.org builds breaks extensions
Type: crash Stage: resolved
Components: None Versions: Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: barry-scott, eric.araujo, ned.deily
Priority: normal Keywords:

Created on 2012年03月03日 23:56 by barry-scott, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (4)
msg154859 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2012年03月03日 23:56
I'm testing on Mac OS X 10.7.3
http://bugs.python.org/issue4865 added
/Library/Python/2.7/site-packages
to the path for python.org built 2.7.
This will work for .py files but .so cannot be shared.
pysvn will SEGV python.org 2.7 when it is built against apple 2.7.
Because /Library/Python/2.7/site-packages is before
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages it is not possible to work around by install two binary kits.
To reproduce:
Install pysvn 1.7.6 for python.org
Then run python.org 2.7 and import pysvn. This will work.
Install pysvn 1.7.6 for Apple python. python.org 2.7 import pysvn is now broken.
$ /usr/bin/python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 23351500)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysvn
>>> pysvn
<module 'pysvn' from '/Library/Python/2.7/site-packages/pysvn/__init__.pyc'>
>>> ^D
$ /usr/local/bin/python2.7
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysvn
Segmentation fault: 11
msg154861 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2012年03月04日 00:07
Pysvn binary kits can be downloaded from
http://pysvn.tigris.org/files/documents/1233/49180/py27_python_org_pysvn_svn1617-1.7.6-1457-intel.dmg
and
http://pysvn.tigris.org/files/documents/1233/49178/py27_apple_com_pysvn_svn1617-1.7.6-1457-intel.dmg 
msg154875 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012年03月04日 02:22
Sorry, I can't reproduce the problem. By default and by design, Library/Python/2.7/site-packages comes last in sys.path for the python.org installed Pythons. Are you sure you aren't overriding sys.path with a PYTHONPATH environment variable or some change to site.py?
$ /usr/bin/python2.7
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 23351500)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; from pprint import pprint as pp ; pp(sys.path)
['',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/Users/pyi/Library/Python/2.7/lib/python/site-packages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
 '/Library/Python/2.7/site-packages']
>>> import pysvn
>>> pysvn
<module 'pysvn' from '/Library/Python/2.7/site-packages/pysvn/__init__.py'>
>>> ^D
pyb7:~ pyi$ /usr/local/bin/python2.7
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; from pprint import pprint as pp ; pp(sys.path)
['',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/Users/pyi/Library/Python/2.7/lib/python/site-packages',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages',
 '/Library/Python/2.7/site-packages']
>>> import pysvn
>>> pysvn
<module 'pysvn' from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysvn/__init__.py'>
>>>
msg154886 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2012年03月04日 10:50
I have wxPython installed. Uninstalling it changes the order of sys.path to this:
['',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages',
 '/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7',
 '/Library/Python/2.7/site-packages',
 '/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7']
I'll take this up with the wxPython folks.
History
Date User Action Args
2022年04月11日 14:57:27adminsetgithub: 58396
2012年03月04日 17:33:29ned.deilysetstatus: open -> closed
2012年03月04日 10:50:14barry-scottsetstatus: pending -> open

messages: + msg154886
2012年03月04日 09:15:55ned.deilysetstatus: open -> pending
title: Sharing site-packages between Apply and python.org builds breaks extensions -> Sharing site-packages between Apple and python.org builds breaks extensions
2012年03月04日 08:51:26eric.araujosetstatus: pending -> open
nosy: + eric.araujo
2012年03月04日 02:25:22ned.deilysetstatus: open -> pending
2012年03月04日 02:22:56ned.deilysetnosy: + ned.deily
messages: + msg154875

assignee: ned.deily
resolution: works for me
stage: resolved
2012年03月04日 00:07:36barry-scottsetmessages: + msg154861
2012年03月03日 23:56:18barry-scottcreate

AltStyle によって変換されたページ (->オリジナル) /