Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
macvim: Now builds with brewed python 2.x
Browse files Browse the repository at this point in the history
The python3 option has been removed because enabling it
made the MacVim GUI disappear when `:python3` is executed.

Further, using Python 3.x seems to disable the 2.x bindings.

Now tested to work with powerline.
  • Loading branch information
samueljohn committed Jun 10, 2013
1 parent 5f86f17 commit ee0d6c0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Library/Formula/macvim.rb
Expand Up @@ -14,7 +14,7 @@ class Macvim < Formula
depends_on 'cscope' => :recommended
depends_on 'lua' => :optional
depends_on :python => :recommended
depends_on :python3 => :optional # Help us! :python3 in MacVim makes the window disappear!
# Help us! :python3 in MacVim makes the window disappear, so only 2.x bindings!

depends_on :xcode # For xcodebuild.

Expand Down Expand Up @@ -51,7 +51,16 @@ def install
end

args << "--enable-pythoninterp=yes" if build.with? 'python'
args << "--enable-python3interp=yes" if build.with? "python3"

# MacVim seems to link Python by `-framework Python` (instead of
# `python-config --ldflags`) and so we have to pass the -F to point to
# where the Python.framework is located, we want it to use!
# Also the -L is needed for the correct linking. This is a mess but we have
# to wait until MacVim is really able to link against different Python's
# on the Mac. Note configure detects brewed python correctly, but that
# is ignored.
# See https://github.com/mxcl/homebrew/issues/17908
ENV.prepend 'LDFLAGS', "-L#{python2.libdir} -F#{python2.framework}" if python.brewed?

unless MacOS::CLT.installed?
# On Xcode-only systems:
Expand Down

0 comments on commit ee0d6c0

Please sign in to comment.