Monday, April 3, 2017

Re: How to make vim embed my own custom version of python ?

> If there is a command-line configure argument for the Python path
> (--with-python3-config-dir maybe? On my system, python3-config is a
> Python script which, just like the Python3 interpreter, lives in
> /usr/bin) you could have added it space-separated inside the value for
> CONF_OPT_PYTHON3, something like
>
> export CONF_OPT_PYTHON3='--enable-python3interp
> --with-python3-config-dir=/home/jackyliu/.local/dir'
>
> If you haven't changed python-config, and haven't copied it or linked
> it in your patched Python interpreter's directory, then I suppose your
> hack of setting $vi_cv_path_python3 is the least bad solution.
>
> Best regards,
> Tony.


Nope, just setting --with-python3-config-dir is not sufficient, configure yielded result like this:

checking --enable-python3interp argument... yes
checking for python3... /usr/bin/python3
checking Python version... 3.5
checking Python is 3.0 or better... yep
checking Python's abiflags... m
checking Python's install prefix... /usr
checking Python's execution prefix... /usr
checking Python's configuration directory... (cached) /home/jacky/Build/PythonX/python3_pyx/Python-3.6.1
checking Python3's dll name... libpython3.6m.so.1.0

Note configure still looks into /usr to try to find python, and it found 3.5。I suppose setting the variable $vi_cv_path_python3 can't be avoided, maybe my need is too rare?

Also I learned these:

*. Python has to be configured with the --enable-shared option on.
*. Vim has to be configured with this variable set properly:
export LD_LIBRARY_PATH=/home/jacky/.local/lib

and the same with the later invoking of Vim, I added it into my .bashrc。

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment