WORKAROUND: Allow to honor PYTHONHOME environment variable for +python/dyn and +python3/dyn

It is temporary fix and it may be changed in the future
https://github.com/vim/vim/pull/500

Example:

	let $PYTHONHOME="/usr/local/Frameworks/Python.framework/Versions/2.7"
	set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
This commit is contained in:
Kazuki Sakamoto
2015-12-03 23:36:01 -08:00
parent d8ddc5d860
commit e73d89fed8
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -932,7 +932,10 @@ Python_Init(void)
#endif
#ifdef PYTHON_HOME
Py_SetPythonHome(PYTHON_HOME);
# ifdef DYNAMIC_PYTHON
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
# endif
Py_SetPythonHome(PYTHON_HOME);
#endif
init_structs();
+4 -1
View File
@@ -858,7 +858,10 @@ Python3_Init(void)
#ifdef PYTHON3_HOME
Py_SetPythonHome(PYTHON3_HOME);
# ifdef DYNAMIC_PYTHON3
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
# endif
Py_SetPythonHome(PYTHON3_HOME);
#endif
PyImport_AppendInittab("vim", Py3Init_vim);