[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56239] trunk/blender/source: minor changes to get numpy working with locally bundled python.
Campbell Barton
ideasman42 at gmail.com
Tue Apr 23 15:51:27 CEST 2013
Revision: 56239
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56239
Author: campbellbarton
Date: 2013-04-23 13:51:20 +0000 (Tue, 23 Apr 2013)
Log Message:
-----------
minor changes to get numpy working with locally bundled python.
- enable site-packages for bundled python distrobution, py3.2 had a problem where it would try to parse headers we didnt include, but its resolved now.
- workaround for glitch I was having on arch-linux where lib64 would be be used for the bundled python directory when it was just a symlink.
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_interface.c
trunk/blender/source/creator/CMakeLists.txt
Modified: trunk/blender/source/blender/python/intern/bpy_interface.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_interface.c 2013-04-23 11:34:18 UTC (rev 56238)
+++ trunk/blender/source/blender/python/intern/bpy_interface.c 2013-04-23 13:51:20 UTC (rev 56239)
@@ -259,12 +259,15 @@
* Python doesn't expose a good way to set this. */
BLI_setenv("PYTHONIOENCODING", "utf-8:surrogateescape");
+ /* Update, Py3.3 resolves attempting to parse non-existing header */
+#if 0
/* Python 3.2 now looks for '2.xx/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. */
if (py_path_bundle) {
Py_NoSiteFlag = 1;
}
+#endif
Py_FrozenFlag = 1;
Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt 2013-04-23 11:34:18 UTC (rev 56238)
+++ trunk/blender/source/creator/CMakeLists.txt 2013-04-23 13:51:20 UTC (rev 56239)
@@ -423,11 +423,15 @@
# on some platforms (like openSUSE) Python is linked
# to be used from lib64 folder.
# determine this from Python's libraries path
- if(${PYTHON_LIBPATH} MATCHES "lib64$")
+ #
+ # ugh, its possible 'lib64' is just a symlink to 'lib' which causes incorrect use of 'lib64'
+ get_filename_component(_pypath_real ${PYTHON_LIBPATH} REALPATH)
+ if(${_pypath_real} MATCHES "lib64$")
set(_target_LIB "lib64")
else()
set(_target_LIB "lib")
endif()
+ unset(_pypath_real)
# Copy the systems python into the install directory
# Scons copy in tools/Blender.py
More information about the Bf-blender-cvs
mailing list