diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-23 07:04:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-23 07:04:18 +0300 |
commit | 8438ef4d8e33f542fc7c93c6e8983bffa6667ab8 (patch) | |
tree | 023563e3f2186a1c41ff8a645aeec6a96f0e9f7f /source/blender/python | |
parent | 19afb0ea672220cd373d44b71e7658cbdf976d70 (diff) |
Cleanup: update comments, remove disabled code
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 1051780d821..f46588206ee 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -804,8 +804,12 @@ void PyC_MainModule_Restore(PyObject *main_mod) Py_XDECREF(main_mod); } -/* Must be called before Py_Initialize, - * expects output of BKE_appdir_folder_id(BLENDER_PYTHON, NULL). */ +/** + * - Must be called before #Py_Initialize. + * - Expects output of `BKE_appdir_folder_id(BLENDER_PYTHON, NULL)`. + * - Note that the `PYTHONPATH` environment variable isn't reliable, see T31506. + Use #Py_SetPythonHome instead. + */ void PyC_SetHomePath(const char *py_path_bundle) { if (py_path_bundle == NULL) { @@ -824,20 +828,10 @@ void PyC_SetHomePath(const char *py_path_bundle) /* OSX allow file/directory names to contain : character (represented as / in the Finder) * but current Python lib (release 3.1.1) doesn't handle these correctly */ if (strchr(py_path_bundle, ':')) { - printf( - "Warning : Blender application is located in a path containing : or / chars\ - \nThis may make python import function fail\n"); - } -# endif - -# if 0 /* disable for now [#31506] - campbell */ -# ifdef _WIN32 - /* cmake/MSVC debug build crashes without this, why only - * in this case is unknown.. */ - { - /*BLI_setenv("PYTHONPATH", py_path_bundle)*/; + fprintf(stderr, + "Warning! Blender application is located in a path containing ':' or '/' chars\n" + "This may make python import function fail\n"); } -# endif # endif { |