neovim/neovim — pull request #1358 by elmart (2014-10-29 21:05:46+00:00)
Title: Fix python setup

This evening I wanted to try if my python plugins worked.
I pip installed neovim module and added the call to python_setup to my .vimrc, and started neovim.
But all my python plugins complained about python not being available.
python_setup.vim was executing before anything else, there were no errors... weird.

Until I realized it was picking the wrong version of python.
I mean, I have macports python (version 2.7.8) in addition to system-level python (2.7.6).
Macports python is the one first in my path, and the one I used to pip install neovim module.
But, for some reason, neovim was just picking system level python.

In the end, it turns out that, in python_setup.vim:
- executable() calls do in fact respect $PATH, and detect macports version.
- system() calls do not respect $PATH, and execute system-level python.

And so, they don't find neovim module. But it doesn't say anything!

So, this PR fixes two points:
- Makes python setup report errors, if any, making clear which python version is being picked.
- Makes sure python version on user's path is used on system() calls.