Revision: 34711
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34711
Author:   campbellbarton
Date:     2011-02-08 06:22:06 +0000 (Tue, 08 Feb 2011)
Log Message:
-----------
problem with blender and python 3.2
- python 3.2 does 'import site' on startup which now tries to parse pyconfig.h 
which isn't copied. so for now just run without importing 'site', alternative 
would be to copy the header file for posix systems.
- cache PYTHON_VERSION variable so it can be set to 3.2, needed for copying 
python installation's other then 3.1.

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

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt        2011-02-08 05:51:20 UTC (rev 34710)
+++ trunk/blender/CMakeLists.txt        2011-02-08 06:22:06 UTC (rev 34711)
@@ -226,7 +226,7 @@
                # No way to set py31. remove for now.
                # find_package(PythonLibs)
                set(PYTHON /usr)
-               set(PYTHON_VERSION 3.1)
+               set(PYTHON_VERSION 3.1 CACHE STRING "")
                set(PYTHON_INCLUDE_DIRS 
"${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
                mark_as_advanced(PYTHON_INCLUDE_DIRS)
                # set(PYTHON_BINARY python) # not used yet

Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c  2011-02-08 
05:51:20 UTC (rev 34710)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c  2011-02-08 
06:22:06 UTC (rev 34711)
@@ -230,6 +230,11 @@
 
        BPY_python_start_path(); /* allow to use our own included python */
 
+       /* Python 3.2 now looks for '2.56/python/include/python3.2d/pyconfig.h' 
to parse
+        * from the 'sysconfig' module which is used by 'site', so for now 
disable site.
+        * alternatively we could copy the file. */
+       Py_NoSiteFlag= 1;
+
        Py_Initialize(  );
        
        // PySys_SetArgv( argc, argv); // broken in py3, not a huge deal

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to