Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-12-08 15:16:34 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-12-08 15:16:34 +0300
commit88b0e1c52ad9df86ea3ca7c897672babfe21be0b (patch)
tree43afbdd1a517ce7c5df7b9ff44769109744c7172 /source
parent0391b1ab780b34a149d3c4181d0fe676ef55199e (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/intern/bpy_interface.c8
1 files changed, 8 insertions, 0 deletions
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);