Make sure python.zip is extracted only once. This prevents erroring build on the...
authorNathan Letwory <nathan@letworyinteractive.com>
Mon, 28 Feb 2011 13:18:00 +0000 (13:18 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Mon, 28 Feb 2011 13:18:00 +0000 (13:18 +0000)
build_files/scons/tools/Blender.py

index 64d0a3f0caa1832471ba1e918b381eb374bc25ae..726b7ac6c227b31d5382f62a5aedb8d8cff28fe6 100644 (file)
@@ -680,6 +680,8 @@ def bsc(env, target, source):
 
 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 @@ class BlenderEnvironment(SConsEnvironment):
             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):