SDカードっていきなり読めなくなるから怖い。
# python
sudo apt-get -y install git libreadline-dev libbz2-dev libsqlite3-dev libssl-dev
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
git clone https://github.com/s1341/pyenv-alias.git ~/.pyenv/plugins/pyenv-alias
echo'export PYENV_ROOT="${HOME}/.pyenv"'>> ~/.bashrc
echo'if [ -d "${PYENV_ROOT}" ]; then'>> ~/.bashrc
echo' export PATH=${PYENV_ROOT}/bin:$PATH'>> ~/.bashrc
echo' eval "$(pyenv init -)"'>> ~/.bashrc
echo'fi'>> ~/.bashrc
exec$SHELL -l
export PY2V=2.7.9
export PY3V=3.4.3
pyenv install ${PY2V}
pyenv rehash
VERSION_ALIAS="${PY2V}.so"PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PY2V}
pyenv rehash
pyenv install ${PY3V}
pyenv rehash
VERSION_ALIAS="${PY3V}.so"PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PY3V}
pyenv rehash
# luajit
curl -O http://luajit.org/download/LuaJIT-2.0.3.tar.gz
tar zxf ./LuaJIT-2.0.3.tar.gz
pushd ./LuaJIT-2.0.3
make
sudo make install
popd# vim
sudo apt-get -y build-dep vim
pyenv global ${PY2V}.so ${PY3V}.so
pyenv rehash
hg clone https://vim.googlecode.com/hg/ vim
pushd ./vim
hg update v7-4-664
find ./ -name config.cache -delete
LDFLAGS="-Wl,-rpath=${HOME}/.pyenv/versions/${PY2V}.so/lib:${HOME}/.pyenv/versions/${PY3V}.so/lib:/usr/local/lib"\
./configure \
--enable-fail-if-missing \
--with-features=huge \
--disable-darwin \
--disable-selinux \
--enable-multibyte \
--enable-fontset \
--enable-perlinterp \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-tclinterp \
--enable-rubyinterp \
--enable-luainterp=yes \
--with-lua-prefix=/usr/local \
--with-luajit
make
sudo make install
popd
pyenv global ${PY2V}${PY3V}
pyenv rehash
unset PY2V
unset PY3V
# git
sudo apt-get install libcurl4-openssl-dev
git clone https://github.com/git/git.git
pushd ./git
git checkout refs/tags/v2.3.3
make
make install
popd
ほとんどはその辺に転がっているスクリプトなので補足しない。pyenv-alias
はpyenv
でのインストール時に別名を与えるマイナーなプラグイン。
普通にpyenv
でpythonをインストールすると、同じバージョンでstaticとsharedを共存させられないが、pyenv-alias
を使うと可能になる。
sharedはvim用。