[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46102] trunk/blender: WITH_PYTHON_INSTALL_NUMPY option for unix/cmake, just copies from site-packages.
Campbell Barton
ideasman42 at gmail.com
Mon Apr 30 11:38:32 CEST 2012
Revision: 46102
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46102
Author: campbellbarton
Date: 2012-04-30 09:38:32 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
WITH_PYTHON_INSTALL_NUMPY option for unix/cmake, just copies from site-packages.
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/source/creator/CMakeLists.txt
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2012-04-30 09:06:19 UTC (rev 46101)
+++ trunk/blender/CMakeLists.txt 2012-04-30 09:38:32 UTC (rev 46102)
@@ -228,6 +228,7 @@
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
+option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
option(WITH_MINGW64 "Use the 64-bit version of MinGW" OFF)
mark_as_advanced(WITH_MINGW64)
@@ -1612,6 +1613,13 @@
"to a valid python include path. Containing "
"Python.h for python version \"${PYTHON_VERSION}\"")
endif()
+
+ if(WITH_PYTHON_INSTALL_NUMPY)
+ if(NOT EXISTS "${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/numpy")
+ message(WARNING "Numpy path '${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/numpy' is missing, "
+ "WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
+ endif()
+ endif()
endif()
@@ -1668,7 +1676,7 @@
_setting)
set(_msg " * ${_setting}")
string(LENGTH "${_msg}" _len)
- while("28" GREATER "${_len}")
+ while("32" GREATER "${_len}")
set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1")
endwhile()
@@ -1728,6 +1736,7 @@
info_cfg_text("Python:")
info_cfg_option(WITH_PYTHON_INSTALL)
+ info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
info_cfg_option(WITH_PYTHON_MODULE)
info_cfg_option(WITH_PYTHON_SAFETY)
Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt 2012-04-30 09:06:19 UTC (rev 46101)
+++ trunk/blender/source/creator/CMakeLists.txt 2012-04-30 09:38:32 UTC (rev 46102)
@@ -438,7 +438,28 @@
# # doesnt work, todo
# install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
+
+ if(WITH_PYTHON_INSTALL_NUMPY)
+ install(
+ DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/numpy
+ DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/site-packages
+ PATTERN ".svn" EXCLUDE
+ PATTERN "__pycache__" EXCLUDE # * any cache *
+ PATTERN "*.pyc" EXCLUDE # * any cache *
+ PATTERN "*.pyo" EXCLUDE # * any cache *
+ PATTERN "distutils" EXCLUDE # ./distutils
+ PATTERN "oldnumeric" EXCLUDE # ./oldnumeric
+ PATTERN "doc" EXCLUDE # ./doc
+ PATTERN "tests" EXCLUDE # ./tests
+ PATTERN "f2py" EXCLUDE # ./f2py - fortran/python interface code, not fun for blender devs.
+ PATTERN "include" EXCLUDE # include dirs all over, we wont use NumPy/CAPI
+ PATTERN "*.h" EXCLUDE # some includes are not in include dirs
+ PATTERN "*.a" EXCLUDE # ./core/lib/libnpymath.a - for linking, we dont need.
+ )
+ endif()
+
unset(_target_LIB)
+
endif()
endif()
elseif(WIN32)
More information about the Bf-blender-cvs
mailing list