diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-21 13:26:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-21 13:26:28 +0400 |
commit | 0ebf23c0b8de670ea856757f6950c515efd87a71 (patch) | |
tree | 12b1b3127bbcdd831d7a68e985992f488113c8b3 /source/blender/python | |
parent | ca466dc8d825e06255e4b76507dbb5e052ede693 (diff) |
BLI_setenv, use instead of copying ifdefs about for setting env vars.
set PYTHONHOME as well as PYTHONPATH, quiets some warnings.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 76852d99b56..1a2bb57a423 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -160,28 +160,8 @@ void BPY_start_python_path(void) /* set the environment path */ printf("found bundled python: %s\n", py_path_bundle); -#if (defined(WIN32) || defined(WIN64)) -#if defined(FREE_WINDOWS) - { - char py_path[FILE_MAXDIR + 11] = ""; - sprintf(py_path, "PYTHONPATH=%s", py_path_bundle); - putenv(py_path); - } -#else - _putenv_s("PYTHONPATH", py_path_bundle); -#endif -#else -#ifdef __sgi - { - char py_path[FILE_MAXDIR + 11] = ""; - sprintf(py_path, "PYTHONPATH=%s", py_path_bundle); - putenv(py_path); - } -#else - setenv("PYTHONPATH", py_path_bundle, 1); -#endif -#endif - + BLI_setenv("PYTHONHOME", py_path_bundle); + BLI_setenv("PYTHONPATH", py_path_bundle); } |