[MacPorts] #41344: vim @7.4.052_0+breakindent+huge+python27+python33 - vim breaks with two Python versions

MacPorts noreply at macports.org
Tue Nov 12 18:13:12 PST 2013


#41344: vim @7.4.052_0+breakindent+huge+python27+python33 - vim breaks with two
Python versions
-------------------------+--------------------------------
 Reporter:  ml@…         |      Owner:  macports-tickets@…
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.2.1
 Keywords:  vim, python  |       Port:  vim
-------------------------+--------------------------------
 Running:
  - Mac OS 10.8.5, XCode 5 (iMac 2013)
  - Mac OS 10.7.5, XCode 4.5 (Macbook Air 2011)

 Related Issues (probably?):
  - [ticket:39207 ticket:39207 vim
 @7.3.762_2+cscope+huge+perl+python27+python33+tcl is broken after
 upgrading MacPorts python27 from 2.7.3 to 2.7.5]


 Python 2.7 and 3.3 work fine, as do `vim
 @7.4.052_0+breakindent+huge+python27` and `vim
 @7.4.052_0+breakindent+huge+python33`

 However, when both Python options are set, Vim does not function as
 expected.

 {{{
 :python3 import sys
 E370: Could not load library Python.framework/Versions/3.3/Python
 E263: Sorry, this command is disabled, the Python library could not be
 loaded.
 }}}

 {{{
 :python import sys
 Traceback (most recent call last):
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 548, in <module>
 main()
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 530, in main
 known_paths = addusersitepackages(known_paths)
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 266, in addusersitepackages
 user_site = getusersitepackages()
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 241, in getusersitepackages
 user_base = getuserbase() # this will also set USER_BASE
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 231, in getuserbase
 USER_BASE = get_config_var('userbase')
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py",
 line 516, in get_config_var
 return get_config_vars().get(name)
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py",
 line 449, in get_config_vars
 import re
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py",
 line 105, in <module>
 import sre_compile
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py",
 line 14, in <module>
 import sre_parse
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py",
 line 17, in <module>
 from sre_constants import *
 File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.py",
 line 18, in <module>
 from _sre import MAXREPEAT
 ImportError: cannot import name MAXREPEAT
 }}}

 I am unclear on what is happening, as the path to Python looks correct.
 Furthermore, I have no problem importing `MAXREPEAT` from `_sre`.

 I attempted a clean install of Macports on the Macbook Air (10.7), but the
 problem persists.

 When I rebuild from source with:
 {{{ $ sudo port -d -s install vim +breakindent +huge +python27 +python33
 }}}

 I successfully see:
 {{{
 checking Python version... 2.7
 checking Python is 2.3 or better... yep
 checking Python's install prefix...
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7
 checking Python's execution prefix...
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7
 checking Python's configuration directory...
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
 checking if -pthread should be used... no
 checking if compile and link flags for Python are sane... yes
 checking --enable-python3interp argument... yes
 checking --with-python3 argument... /opt/local/bin/python3.3
 checking Python version... 3.3
 checking Python is 3.0 or better... yep
 checking Python's abiflags... m
 checking Python's install prefix...
 /opt/local/Library/Frameworks/Python.framework/Versions/3.3
 checking Python's execution prefix...
 /opt/local/Library/Frameworks/Python.framework/Versions/3.3
 checking Python's configuration directory...
 /opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config-3.3m
 checking if -pthread should be used... no
 checking if compile and link flags for Python 3 are sane... yes
 checking whether we can do without RTLD_GLOBAL for Python... no
 checking whether we can do without RTLD_GLOBAL for Python3... yes
 }}}

 I've attached the full debug/source output from both versions of the OS.

-- 
Ticket URL: <https://trac.macports.org/ticket/41344>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list