branching vim to have vim with python


I am wanting to experiment building a package with OBS. I wanted to branch .

Currently vim isn’t built with python in, so that if in vim you used the command

:echo has('python')

would return 1, it currently returns 0. This stops it having ipython integration.

in the vim.spec I can see a buildrequires for python-devel, just wondering why this isn’t then building python in so it would echo 1 and allow ipyhon integration to work.

BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  python3-devel

Well, this does return 1 here for me, with the standard vim package from 13.1.

And the buildlog of your link has this for 13.1:

  221s] checking --enable-pythoninterp argument... dynamic
  221s] checking for python2... /usr/bin/python2
  222s] checking Python version... 2.7
  222s] checking Python is 2.3 or better... yep
  222s] checking Python's install prefix... /usr
  222s] checking Python's execution prefix... /usr
  223s] checking Python's configuration directory... /usr/lib64/python2.7/config
  223s] checking if -pthread should be used... yes
  223s] checking if compile and link flags for Python are sane... yes
  223s] checking --enable-python3interp argument... dynamic
  223s] checking for python3... /usr/bin/python3
  228s] checking Python version... 3.3
  229s] checking Python is 3.0 or better... yep
  229s] checking Python's abiflags... m
  229s] checking Python's install prefix... /usr
  229s] checking Python's execution prefix... /usr
  229s] checking Python's configuration directory... /usr/lib64/python3.3/config-3.3m

which should confirm that it is built with python support, right?

So maybe there’s something wrong with your configuration? Try with a new user.

Thanks, I totally removed all vim instances and .vimrc and .vim and reinstalled it all and now it works so there must have been a glitch in there somewhere.