diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2004-09-26 00:45:44 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2004-09-26 00:45:44 +0400 |
commit | e43ea677abc03ee6e76cd7429ef7fb983c0366a9 (patch) | |
tree | 7326f1ba3a726161d9ecbf441c8fcac87108c157 /tools/scons/bs/bs_config.py | |
parent | f9542b45bc5c8a040bbb1d1dd68dcaa1341ed119 (diff) |
note to all: actually adding+commited new files does help a lot.
:]
Diffstat (limited to 'tools/scons/bs/bs_config.py')
-rw-r--r-- | tools/scons/bs/bs_config.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/scons/bs/bs_config.py b/tools/scons/bs/bs_config.py new file mode 100644 index 00000000000..7413ee9ab7b --- /dev/null +++ b/tools/scons/bs/bs_config.py @@ -0,0 +1,37 @@ +# configuration functions +import sys +import os + +import SCons.Script +import bs_globals + +def checkPyVersion(): + if hex(sys.hexversion) < 0x2030000: + print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + print + print "You need at least Python 2.3 to build Blender with SCons" + print + print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + sys.exit() + +def parseOpts(): + copyloc = '' + + all_args = sys.argv[1:] + parser = SCons.Script.OptParser() + options, targets = parser.parse_args(all_args) + if ('clean' in targets): + bs_globals.enable_clean = 1 + + # User configurable options file. This can be controlled by the user by running + # scons with the following argument: CONFIG=user_config_options_file + bs_globals.config_file = bs_globals.arguments.get('CONFIG', 'config.opts') + bs_globals.root_build_dir = bs_globals.arguments.get('root_build_dir', '..' + os.sep + 'build' + os.sep + sys.platform + os.sep) + + copyloc = bs_globals.arguments.get('copyto', '0') + if copyloc == '0': + bs_globals.docopy = 0; + else: + bs_globals.docopy = 1; + bs_globals.copyto = copyloc +
\ No newline at end of file |