From 88b0e1c52ad9df86ea3ca7c897672babfe21be0b Mon Sep 17 00:00:00 2001 From: Damien Plisson Date: Tue, 8 Dec 2009 12:16:34 +0000 Subject: OSX: print warning if Blender application is located in a path Python lib can't handle (bug # 20258) OSX allow file/directory names to contain ':' (displayed as '/' in Finder), and current Python lib (3.1.1) has trouble with those when importing modules. Added warning message to help user understand why Blender start fails in this case. --- source/blender/python/intern/bpy_interface.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source') diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index af1d522600a..d1ef7401494 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -280,6 +280,14 @@ void BPY_start_python_path(void) /* set the environment path */ printf("found bundled python: %s\n", py_path_bundle); +#ifdef __APPLE__ + /* 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 BLI_setenv("PYTHONHOME", py_path_bundle); BLI_setenv("PYTHONPATH", py_path_bundle); -- cgit v1.2.3