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

Vim builds without Python support on 10.9 #23414

Closed
hovsater opened this issue Oct 21, 2013 · 11 comments
Closed

Vim builds without Python support on 10.9 #23414

hovsater opened this issue Oct 21, 2013 · 11 comments

Comments

@hovsater
Copy link
Contributor

In the Vim formula, Python support is only available if Python is brewed, i.e., brew install python or a system version of Python is present but CLT is not.

Is there any reason to this? IIRC, Homebrew does support custom Python installations such as installations using pyenv or similar.

While doing brew install --verbose vim I see this:

checking --enable-pythoninterp argument... yes
checking for python2... /Users/KevinSjoberg/.pyenv/shims/python2
checking Python version... 2.7
checking Python is 2.3 or better... yep
checking Python's install prefix... /Users/KevinSjoberg/.pyenv/versions/2.7.5
checking Python's execution prefix... /Users/KevinSjoberg/.pyenv/versions/2.7.5
checking Python's configuration directory... /Users/KevinSjoberg/.pyenv/versions/2.7.5/lib/python2.7/config
checking if -pthread should be used... no
checking if compile and link flags for Python are sane... no: PYTHON DISABLED
checking --enable-python3interp argument... no

Why is the link flags for Python not sane?

@jacknagel
Copy link
Contributor

Python support is only available if Python is brewed, i.e., brew install python or a system version of Python is present but CLT is not.

I assume you are referring to this:

https://github.com/mxcl/homebrew/blob/a4949cd2db9f79df9adb542e72e22d33aa813952/Library/Formula/vim.rb#L52-62

but that's not what that logic means; it's just a little extra setup required for those two cases. The system python works fine on any configuration.

As far as

checking if compile and link flags for Python are sane... no: PYTHON DISABLED

you'd have to look at the config.log after configure finishes to see exactly why this check failed.

@hovsater
Copy link
Contributor Author

@jacknagel so it can be any Python installation? Here is an excerpt from my src/auto/config.log, http://vpaste.net/baho2.

Any ideas?

@adamv
Copy link
Contributor

adamv commented Oct 21, 2013

Vim requires a Framework build of Python on OS X and probably your build isn't a framework.

ld: framework not found Python

Yep.

@hovsater
Copy link
Contributor Author

Yeah, that was what I thought as well. But then it gets odd. If I fallback to the system installation of Python, i.e., /System/Library/Frameworks/Python.framework/Versions/2.7/, I get the same error.

Isn't the system installation compiled with --enable-framework?

@adamv
Copy link
Contributor

adamv commented Oct 21, 2013

We'd need to see the full troubleshooting information to debug further.

@hovsater
Copy link
Contributor Author

Sure, but I'm not sure you want to debug this any further until OS X Mavericks has been released. I'm using 10.9.

@adamv
Copy link
Contributor

adamv commented Oct 23, 2013

Well it's out now.

@hovsater
Copy link
Contributor Author

I've followed the steps https://github.com/mxcl/homebrew/wiki/Troubleshooting.

See https://gist.github.com/KevinSjoberg/7114782 (includes output from using pyenv and without it). No files where present in the directory /Users/KevinSjoberg/Library/Logs/Homebrew/vim so I couldn't include that in the gist.

@adamv
Copy link
Contributor

adamv commented Nov 8, 2013

What is your brew-config?

You'll almost certainly need to remove these shims from your path.

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /Users/KevinSjoberg/.pyenv/shims/python-config
    /Users/KevinSjoberg/.pyenv/shims/python2-config
    /Users/KevinSjoberg/.pyenv/shims/python2.7-config
    /Users/KevinSjoberg/.pyenv/shims/python3-config
    /Users/KevinSjoberg/.pyenv/shims/python3.3-config
    /Users/KevinSjoberg/.pyenv/shims/python3.3m-config

If you're on 10.9, make sure you are on the latest version of Xcode and have run xcode-select --install to get the latest CLT.

@adamv adamv closed this as completed Nov 8, 2013
@hovsater
Copy link
Contributor Author

hovsater commented Nov 8, 2013

@adamv since Mavericks went public, I have managed to install Vim with Python support. You can close this.

@mistydemeo
Copy link
Member

Please follow the troubleshooting guide and open a new issue, thanks!

@Homebrew Homebrew locked and limited conversation to collaborators Aug 25, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants