Tuesday, May 3, 2011

Compiling vim with specific version of Python

I'm working on several Python projects who run on various versions of
Python. I'm hoping to set up my vim environment to use ropevim,
pyflakes, and pylint but I've run into some issues caused by using a
single vim (compiled for a specific version of Python which doesn't
match the project's Python version).

I'm hoping to build vim into each of my virtualenv directories but
I've run into an issue and I can't get it to work. When I try to build
vim from source, despite specifying the Python config folder in my
virtualenv, the system-wide Python interpreter is always used.

configure --prefix=/virtualenv/project --enable-pythoninterp=yes --
with-python-config-dir=/virtualenv/project/lib/python2.6/config

Results in the following in config.log:

...
configure:5151: checking --enable-pythoninterp argument
configure:5160: result: yes
configure:5165: checking for python
configure:5195: result: /usr/bin/python
...

It should be /virtualenv/project/bin/python. Is there any way to
specify the Python interpreter for vim to use?

NOTE: I can confirm that /virtualenv/project/bin appears at the front
of PATH environment variable.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: