From 795edb74fab61a1f73512070bd1b0043b3afb36c Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 23 May 2012 03:49:42 +0000 Subject: scons - Added option to not remove and unpack python modules bundle every compile --- build_files/scons/tools/Blender.py | 9 +++++++-- build_files/scons/tools/btools.py | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 5a066470225..0c5d37f77fe 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -869,12 +869,17 @@ 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'] and not BlenderEnvironment.PyBundleActionAdded: + if (not lenv['WITHOUT_BF_INSTALL'] and + not lenv['WITHOUT_BF_PYTHON_INSTALL'] and + not lenv['WITHOUT_BF_PYTHON_UNPACK'] 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'] and not BlenderEnvironment.PyBundleActionAdded: + if (not lenv['WITHOUT_BF_PYTHON_INSTALL'] and + not lenv['WITHOUT_BF_PYTHON_UNPACK'] and + not BlenderEnvironment.PyBundleActionAdded): lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print)) BlenderEnvironment.PyBundleActionAdded = True return prog diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 1ad0b886cc4..d3a334b3c96 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -134,7 +134,7 @@ def validate_arguments(args, bc): 'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC', 'BF_TWEAK_MODE', 'BF_SPLIT_SRC', 'WITHOUT_BF_INSTALL', - 'WITHOUT_BF_PYTHON_INSTALL', + 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK', 'WITHOUT_BF_OVERWRITE_INSTALL', 'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_GHOST_COCOA', @@ -519,6 +519,7 @@ def read_opts(env, cfg, args): (BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)), (BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)), (BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)), + (BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)), (BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)), (BoolVariable('BF_FANCY', 'Enable fancy output if true', True)), (BoolVariable('BF_QUIET', 'Enable silent output if true', True)), -- cgit v1.2.3