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