mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
Script Needs A bit Of Refining
parent
28eb8f743e
commit
ba68e0a17b
36
python.md
36
python.md
@ -18,38 +18,4 @@ If your distribution of Ubuntu comes with python 2.7 (like most recent), the pac
|
||||
sudo apt-get install vim
|
||||
```
|
||||
|
||||
If you are on an older Ubuntu machine with 2.6 or older, see compiling instructions below to get latest python and/or vim compiled. Alternatively, you can try to find a PPA with 2.7, but I can't recommend one.
|
||||
|
||||
### Compiling From Source On POSIX
|
||||
The following shell script should build python/vim assuming build requirements are met, just change the apt-get line to whatever your package manager uses. The DIR variable specifies install location for python & vim.
|
||||
|
||||
IMPORTANT: To use these daily, make sure your `.bashrc` or other init file updates PATH so that $DIR/bin is on it. So for BASH, in your `.bashrc` append `export PATH=/usr/local/bin:$PATH`.
|
||||
|
||||
```sh
|
||||
#!/usr/bin/env bash
|
||||
PYTHON_URL=https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
|
||||
# This is where python & vim will be installed to
|
||||
DIR=/usr/local
|
||||
|
||||
# List of dependencies on Ubuntu
|
||||
sudo apt-get install build-essential autoconf libncurses5-dev xz-utils curl mercurial
|
||||
|
||||
# Build python 2.7, install to $DIR
|
||||
PYARC=python.tar.xz
|
||||
curl -fLo $PYARC $PYTHON_URL
|
||||
xzcat $PYARC | tar xvf -
|
||||
cd Python*
|
||||
./configure --prefix=$DIR
|
||||
make && sudo make install
|
||||
cd -
|
||||
\rm -rf Python* $PYARC
|
||||
|
||||
# Build vim with +python, install to $DIR
|
||||
hg clone https://code.google.com/p/vim/
|
||||
cd vim
|
||||
PATH=$DIR/bin:$PATH ./configure --with-features=huge --enable-pythoninterp \
|
||||
--with-python-config-dir=$DIR/lib/python2.7/config --prefix=$DIR
|
||||
PATH=$DIR/bin:$PATH make && sudo make install
|
||||
cd -
|
||||
\rm -rf vim
|
||||
```
|
||||
If you are on an older Ubuntu machine with 2.6 or older, see compiling instructions below to get latest python and/or vim compiled. Alternatively, you can try to find a PPA with 2.7, but I can't recommend one.
|
Loading…
Reference in New Issue
Block a user