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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-27 03:16:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-27 03:16:21 +0400
commit00149cfb9dc660b6796cd479bbb5c2e9391b8865 (patch)
treebca743cf9bfc89b68503b405b9dfa15f93e12d06 /source/creator
parentac1aea71b1bcafb813dfc2133e6e4ed0c1ea633e (diff)
patch [#23041] CMake WITH_PYTHON_INSTALL option
from Dan Eicher (dna) --- snip --- Adds the option to not copy python into the .blender/python directory. Also fixes the problem of deleting the blender installed python where the blender runtime only looks for the copied python and not the system one but not entirely sure why, something to do with CMake hardcoding the PYTHONPATH and PYTHONHOME vars I suppose. This patch only applies to the 'UNIX AND NOT APPLE' platforms but, then again, those are the only ones anyone really cares about...or at least the only ones where using the system python is really viable.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/CMakeLists.txt54
1 files changed, 27 insertions, 27 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 21132b1fe55..a653d45bd14 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -143,32 +143,32 @@ IF(WITH_INSTALL)
COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/.blender/
COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
)
-
- # Copy the systems python into the install directory
- # Scons copy in tools/Blender.py
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMENT "copying a subset of the systems python..."
-
- COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
- COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
- COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
-
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
-
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
- COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages # python needs it.
-
- COMMAND rm -f ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
- COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
- COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
- COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
- )
-
+ IF(WITH_PYTHON_INSTALL)
+ # Copy the systems python into the install directory
+ # Scons copy in tools/Blender.py
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMENT "copying a subset of the systems python..."
+
+ COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
+ COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
+ COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
+
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
+
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
+ COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages # python needs it.
+
+ COMMAND rm -f ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
+ COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
+ COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
+ COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
+ )
+ ENDIF(WITH_PYTHON_INSTALL)
ENDIF(WITH_PYTHON)
ADD_CUSTOM_COMMAND(
@@ -177,7 +177,7 @@ IF(WITH_INSTALL)
)
- # Above we bundle a portable distrobution in ./bin
+ # Above we bundle a portable distribution in ./bin
# This is an optional "make install" which installs blender on the system.
INSTALL(
PROGRAMS ${TARGETDIR}/blender