diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-13 22:09:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-13 22:09:13 +0400 |
commit | 8c6176b84688fae585952992676d56903113c040 (patch) | |
tree | 0ecfacdd33b006a49de95679ca3bc1672dff2109 /source | |
parent | d47e1fee328d816e8f5c308556986669fc262616 (diff) |
use Py_SetPythonHome rather then setting environment vars PYTHONHOME and PYTHONPATH
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index a85bcd011a6..a850809b4a5 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -259,8 +259,17 @@ void BPY_start_python_path(void) /* set the environment path */ printf("found bundled python: %s\n", py_path_bundle); +#if 0 BLI_setenv("PYTHONHOME", py_path_bundle); BLI_setenv("PYTHONPATH", py_path_bundle); +#endif + + { + static wchar_t py_path_bundle_wchar[FILE_MAXDIR]; + + mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); + Py_SetPythonHome(py_path_bundle_wchar); + } } |