[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35261] trunk/blender/build_files/scons/ tools/Blender.py: Make sure python.zip is extracted only once.

Nathan Letwory nathan at letworyinteractive.com
Mon Feb 28 14:18:00 CET 2011


Revision: 35261
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35261
Author:   jesterking
Date:     2011-02-28 13:18:00 +0000 (Mon, 28 Feb 2011)
Log Message:
-----------
Make sure python.zip is extracted only once. This prevents erroring build on the unzip stage.

Modified Paths:
--------------
    trunk/blender/build_files/scons/tools/Blender.py

Modified: trunk/blender/build_files/scons/tools/Blender.py
===================================================================
--- trunk/blender/build_files/scons/tools/Blender.py	2011-02-28 12:05:43 UTC (rev 35260)
+++ trunk/blender/build_files/scons/tools/Blender.py	2011-02-28 13:18:00 UTC (rev 35261)
@@ -680,6 +680,8 @@
 
 class BlenderEnvironment(SConsEnvironment):
 
+    PyBundleActionAdded = False
+
     def BlenderRes(self=None, libname=None, source=None, libtype=['core'], priority=[100]):
         global libs
         if not self or not libname or not source:
@@ -823,12 +825,14 @@
             lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print))
         elif os.sep == '/' and lenv['OURPLATFORM'] != 'linuxcross': # any unix (except cross-compilation)
             if lenv['WITH_BF_PYTHON']:
-                if not lenv['WITHOUT_BF_INSTALL'] and not lenv['WITHOUT_BF_PYTHON_INSTALL']:
+                if not lenv['WITHOUT_BF_INSTALL'] and not lenv['WITHOUT_BF_PYTHON_INSTALL'] and not BlenderEnvironment.PyBundleActionAdded:
                     lenv.AddPostAction(prog,Action(UnixPyBundle,strfunction=my_unixpybundle_print))
+                    BlenderEnvironment.PyBundleActionAdded = True
         elif lenv['OURPLATFORM'].startswith('win') or lenv['OURPLATFORM'] == 'linuxcross': # windows or cross-compilation
             if lenv['WITH_BF_PYTHON']:
-                if not lenv['WITHOUT_BF_PYTHON_INSTALL']:
+                if not lenv['WITHOUT_BF_PYTHON_INSTALL'] and not BlenderEnvironment.PyBundleActionAdded:
                     lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print))
+                    BlenderEnvironment.PyBundleActionAdded = True
         return prog
 
     def Glob(lenv, pattern):




More information about the Bf-blender-cvs mailing list