I have python3 installed via homebrew: brew install python3 --framework
I have the vim source (7.3) downloaded in /usr/src
I run:
./configure --prefix=/usr/local --enable-rubyinterp --enable-python3interp --disable-gpm --enable-gui=no --enable-multibyte
And in my src/auto/config.log
I see:
configure:5442: checking --enable-python3interp argument
configure:5451: result: yes
configure:5456: checking for python3
configure:5489: result: no
I googled around some, and found this, so I tried making the symlink for python3.2 and then running configure like this:
./configure --prefix=/usr/local --enable-rubyinterp --enable-python3interp --disable-gpm --enable-gui=no --enable-multibyte --with-python3-config-dir=/usr/local/Cellar/python3/3.2/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m
And my log shows the same error. What do I need to do to get vim compiled with Python3 support?
And no: I do not want to use MacVim.
➜ ls -al /System/Library/Frameworks/Python.framework/Versions
total 16
drwxr-xr-x 7 root wheel 238 May 28 15:33 .
drwxr-xr-x 7 root wheel 238 Sep 21 2010 ..
drwxr-xr-x 8 root wheel 272 Sep 17 2010 2.3
dr开发者_开发问答wxr-xr-x 12 root wheel 408 Dec 1 12:49 2.5
drwxr-xr-x 12 root wheel 408 Dec 1 12:49 2.6
lrwxr-xr-x 1 root wheel 70 May 28 15:33 Current -> /usr/local/Cellar/python3/3.2/Frameworks/Python.framework/Versions/3.2
lrwxr-xr-x 1 root wheel 3 Sep 17 2010 old-Current -> 2.6
➜ which python3.2
/usr/local/bin/python3.2
UPDATE: I've gotten it working a la this post with Python 2.7.1 via Homebrew, but still no joy with Python 3...
There is a problem with the configure script. Since python 3.2 the config and include directories get the abiflag included (see PEP 3149).
The next problem is that the configure script parses the python config and the flags for the linker are not correct for a framework build, so the test program from the configure script fails to build.
I already send a patch to vim and it got included (the mercurial repo has it).
`./configure --enable-python3interp vi_cv_path_python3=/usr/local/bin/python3.2`
should work.
Vim Patch: https://github.com/codedreality/vim/tree/fix-python3x-support
MacVim Patch: https://github.com/codedreality/macvim/tree/fix-python3x-support
When you test to see if it worked, make sure you use the Vim binary created by the build - not the mvim script. mvim (even if you call the version on your source tree) will look in /Applications/ for MacVim.app first.
Maybe this will give you some joy:
./configure \
--enable-python3interp=dynamic \
--with-python3-config-dir=/usr/local/Cellar/python3/3.2/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config/
I change the macvim titlebar color is black.My macvim colorsechme is ayu dark.
Change macvim MMWindow.m
line 93,append following code:
[self setTitleVisibility:NSWindowTitleHidden];
[self setTitlebarAppearsTransparent:YES];
self.backgroundColor = NSColor.blackColor;
Complier source code with following command:
./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-terminal --enable-python3interp --with-properly-linked-python2-python3 --enable-python3interp=yes --enable-cscope
enter image description here
精彩评论