[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25209] trunk/blender/source/blender/ python/intern/bpy_interface.c: OSX: print warning if Blender application is located in a path Python lib can' t handle (bug # 20258)

Damien Plisson damien.plisson at yahoo.fr
Tue Dec 8 13:16:34 CET 2009


Revision: 25209
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25209
Author:   damien78
Date:     2009-12-08 13:16:34 +0100 (Tue, 08 Dec 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_interface.c

Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c	2009-12-08 10:36:46 UTC (rev 25208)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c	2009-12-08 12:16:34 UTC (rev 25209)
@@ -280,6 +280,14 @@
 	/* 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);





More information about the Bf-blender-cvs mailing list