mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
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:
+4
-1
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user