summaryrefslogtreecommitdiffstats
path: root/src/if_python3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 721e3cc5bb..387b811f61 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -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);