Page MenuHomePhabricator

D59719.diff
No OneTemporary

File Metadata

Created
Sat, Aug 24, 5:55 PM

D59719.diff

Index: source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
===================================================================
--- source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -177,6 +177,16 @@
#endif
Py_SetPythonHome(g_python_home);
#endif
+#else
+#if defined(__APPLE__) && PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 7
+ // For Darwin, the only Python version supported is the one shipped in the OS
+ // and linked with lldb. Other installation of Python may have higher priorities
+ // in the path, overriding PYTHONHOME and causing problems/incompatibilities.
+ // In order to avoid confusion, always hardcode the PythonHome to be right,
+ // as it's not going to change.
+ Py_SetPythonHome("/System/Library/Frameworks/Python.framework/Versions/2.7");
+#endif
+#endif
}
void InitializeThreadsPrivate() {

Event Timeline