copy the systems python to the install dir for re-distrobution (non-osx unix), remove...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 16 Aug 2009 18:14:17 +0000 (18:14 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 16 Aug 2009 18:14:17 +0000 (18:14 +0000)
release/Makefile
source/creator/CMakeLists.txt

index 24827014b16e7e7d1111195f6fd630c349a2403f..94bb902646d5256b3eef881a7b0e27a737260432 100644 (file)
@@ -35,16 +35,6 @@ BLENDNAME=blender-$(VERSION)-$(CONFIG_GUESS)-py$(NAN_PYTHON_VERSION)$(TYPE)
 export DISTDIR=$(NAN_OBJDIR)/$(BLENDNAME)
 export CONFDIR=$(DISTDIR)/.blender
 
-ifeq ($(OS),beos)
-   TAR="zip"
-   TARFLAGS="-ry9"
-   EXT0=""
-   EXT1=".zip"
-   COMPRESS=""
-   EXT2=""
-   NOPLUGINS?=true
-endif
-
 ifeq ($(OS),$(findstring $(OS), "freebsd irix linux openbsd solaris"))
    TAR="tar"
    TARFLAGS="cf"
index 19e338c4d2f54e5b2cccf6133d64c72caff34696..c3931a0df1f93e8b914035416b600ac4971da4aa 100644 (file)
@@ -114,10 +114,36 @@ IF(WITH_INSTALL)
     IF(WITH_PYTHON)
       ADD_CUSTOM_COMMAND(
         TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+        COMMENT "copying blender scripts..."
         COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/.blender/
         COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/.blender/
         COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
       )
+      
+      # Copy the systems python into the install directory
+      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 ${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)
       
     ADD_CUSTOM_COMMAND(