2017-07-09 48 views
1

我想按照網頁上的說明編譯vim80。如何使用python2和3支持從源代碼構建vim80?

build vim80 from source with python2 and 3 support

./configure --with-features=huge \ 
      --enable-multibyte \ 
      --enable-rubyinterp=yes \ 
      --enable-pythoninterp=yes \ 
      --with-python-config-dir=/usr/lib/python2.7/config \ 
      --enable-python3interp=yes \ 
      --with-python3-config-dir=/usr/lib/python3.5/config \ 
      --enable-perlinterp=yes \ 
      --enable-luainterp=yes \ 
      --enable-gui=gtk2 --enable-cscope --prefix=/usr 

如何根據我的環境定製呢?
1.對於python2.7

ls /usr/lib/python2.7 |grep config 
config-x86_64-linux-gnu 
_sysconfigdata.py 
_sysconfigdata.pyc 
_sysconfigdata.pyo 
sysconfig.py 
sysconfig.pyc 
sysconfig.pyo 

2.對於python3

sudo find/-name 'config' |grep python3 
/home/debian8/anaconda3/lib/python3.6/site-packages/navigator_updater/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/spyder/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/spyder/utils/help/js/mathjax/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/notebook/services/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/astropy/config 
/home/debian8/anaconda3/lib/python3.6/site-packages/traitlets/config 
/home/debian8/anaconda3/pkgs/spyder-3.1.4-py36_0/lib/python3.6/site-packages/spyder/config 
/home/debian8/anaconda3/pkgs/spyder-3.1.4-py36_0/lib/python3.6/site-packages/spyder/utils/help/js/mathjax/config 
/home/debian8/anaconda3/pkgs/astropy-1.3.2-np112py36_0/lib/python3.6/site-packages/astropy/config 
/home/debian8/anaconda3/pkgs/traitlets-4.3.2-py36_0/lib/python3.6/site-packages/traitlets/config 
/home/debian8/anaconda3/pkgs/anaconda-navigator-1.6.2-py36_0/lib/python3.6/site-packages/anaconda_navigator/config 
/home/debian8/anaconda3/pkgs/navigator-updater-0.1.0-py36_0/lib/python3.6/site-packages/navigator_updater/config 
/home/debian8/anaconda3/pkgs/notebook-5.0.0-py36_0/lib/python3.6/site-packages/notebook/static/components/MathJax/config 
/home/debian8/anaconda3/pkgs/notebook-5.0.0-py36_0/lib/python3.6/site-packages/notebook/services/config 

更具體而言,如何改變三行我的操作系統?

  --with-python-config-dir=/usr/lib/python2.7/config \ 
      --enable-python3interp=yes \ 
      --with-python3-config-dir=/usr/lib/python3.5/config \ 

這是我對python2和3的支持嘗試。

./configure --with-features=huge \ 
      --enable-multibyte \ 
      --enable-rubyinterp=yes \ 
      --enable-pythoninterp=yes \ 
      --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \ 
      --enable-python3interp=yes \ 
      --with-python3-config-dir=/home/debian8/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config \ 
      --enable-perlinterp=yes \ 
      --enable-luainterp=yes \ 
      --enable-gui=gtk2 --enable-cscope --prefix=/usr 

很不幸的是,在make install之後,不支持python2或python3這個配置。

vim --version|grep python 
+cryptv   +linebreak  -python   +vreplace 
+cscope   +lispindent  -python3   +wildignore 
+0

我不知道你的問題在這裏。你期望看到「+ python」和「+ python3」之外的東西嗎? – GregHNZ

+0

是的,+ python和+ python3 –

回答

1
./configure --prefix=/usr/local/   \ 
         --with-features=huge \ 
         --enable-multibyte \ 
         --enable-cscope=yes \ 
         --enable-perlinterp=yes  \ 
         --enable-rubyinterp=yes  \ 
         --with-ruby-command=/usr/bin/ruby  \ 
         --enable-luainterp=yes    \ 
         --enable-pythoninterp=yes    \ 
         --enable-python3interp=yes   \ 
         --enable-tclinterp=yes     \ 
         --enable-gui=auto --enable-gnome-check \ 
         --enable-xim --enable-fontset   \ 
         --with-x --with-compiledby=$USER