Last active
September 3, 2021 05:31
-
-
Save klen/3d327e5f84e36dc04bd7 to your computer and use it in GitHub Desktop.
OSX vim +python +python3 (pyenv)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# This is just a stub for the Unix configure script, to provide support for | |
# doing "./configure" in the top Vim directory. | |
PY_CONFIG=`pyenv prefix 2.7.11/lib/python2.7/config` | |
PY3_PREFIX=`pyenv prefix 3.4.4` | |
PY3_CONFIG=`$PY3_PREFIX/bin/python-config --configdir` | |
cd src && exec ./configure \ | |
--with-features=huge \ | |
--enable-multibyte \ | |
--enable-pythoninterp=dynamic \ | |
--enable-python3interp=dynamic \ | |
--with-python-config-dir=$PY_CONFIG \ | |
--with-python3-config-dir=$PY3_CONFIG \ | |
--enable-cscope \ | |
--prefix=/usr/local $@ | |
# cd src && exec ./configure "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -fk 2.7.11 | |
$ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -fk 3.4.4 | |
$ mkdir -p ~/lib | |
$ cd ~/lib | |
$ ln -s ../.pyenv/versions/2.7.11/lib/libpython2.7.dylib | |
$ ln -s ../.pyenv/versions/3.4.4/lib/libpython3.4m.dylib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great resource, thank you very much! Question about the
.dylib
bit.How does Python(s) and Vim know where to find the
.dylib
files. In your case,~/lib
is not a standardLD
path?Thanks.