FS#47500 - [gvim] vim/gvim does not contain python3 support
Attached to Project:
Arch Linux
Opened by Yichao Zhou (zhou13) - Wednesday, 23 December 2015, 03:41 GMT
Last edited by Anatol Pomozov (anatolik) - Wednesday, 27 January 2016, 04:28 GMT
Opened by Yichao Zhou (zhou13) - Wednesday, 23 December 2015, 03:41 GMT
Last edited by Anatol Pomozov (anatolik) - Wednesday, 27 January 2016, 04:28 GMT
|
Details
I just switched from Gentoo and I am surprised by the fact
that Archlinux contains two gvim, gvim and gvim-python3. One
does not support python2 and one does not support
python3.
I did some google on this and I found the reason is "vim cann't be compiled with both python2 and python3 support". This is not true: my vim supported both python2 and python3 for a long time in Gentoo. |
This task depends upon
Closed by Anatol Pomozov (anatolik)
Wednesday, 27 January 2016, 04:28 GMT
Reason for closing: Implemented
Wednesday, 27 January 2016, 04:28 GMT
Reason for closing: Implemented
You realize we're talking about python extensions, right?
In Gentoo, this works by default. But you can see in https://gitweb.gentoo.org/repo/gentoo.git/tree/app-editors/vim/vim-7.4.769.ebuild?id=37d1fb7b3fc56a9b4249086e29c282eee9c34b24, line 224, what you do is just compiling vim with "--enable-pythoninterp" and "--enable-python3interp" and setting "vi_cv_path_python" and "vi_cv_path_python3" respectively.
./configure \
--enable-fail-if-missing \
--with-compiledby='Arch Linux' \
--prefix=/usr \
--enable-gui=gtk2 \
--with-features=huge \
--enable-cscope \
--enable-multibyte \
--enable-perlinterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-rubyinterp=dynamic \
--enable-luainterp=dynamic
If we do it, does it mean that both python and python3 become hard dependencies of vim/gvim? Or we can leave it optional?
According to package stats https://www.archlinux.de/?page=PackageStatistics vim is used by ~60% of users. Python2 installed by 99.47% of users, python python3 by 97.64%. It is safe to assume that all vim users have both python2 and python3 installed so new combined vim package will not pull any additional packages.
Users who does not need any language support will use vim-minimal.
So I think merging vim and vim-python3 packages is a reasonable idea.
:python import sys; print(sys.version)
2.7.11 (default, Dec 6 2015, 15:43:46)
[GCC 5.2.0]
:python3 import sys; print(sys.version)
3.5.1 (default, Dec 7 2015, 12:58:09)
[GCC 5.2.0]
Could you please test the python support as well?
What is strange is that if I compile vim with either python on python3 support then /usr/bin/vim gets linked to python{,3}.so. But if I compile it with both python versions support enabled that /usr/bin/vim is *not* linked with python.so. It looks like it finds appropriate Python library dynamically. Do you have more info about such behavior?
http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-dynamic
When Python 2 and Python 3 are both supported they must be loaded dynamically.
I would definitly appreciate a merge of python3-vim and python2-vim in only one vim.
So please do it :)
I also believe it is an upstream jedi-vim issue but we need a stacktrace to clarify it.
You screenshot does not contain python stacktrace, it is the most interesting part here.
Before that, py2 and py3 was exclusive and could not really co-exist... also we benefit from dynamic linking and have more support... -1 for getting gvim-python3 back and +1 for keeping it as now.
The version of vim-jedi in the repository is quite outdated, it points to upstream version 0.7.0 from 2013, I believe the trunk version is already 0.9.0, but they didn't make github release. Maybe we should move it to AUR.