summaryrefslogtreecommitdiff
path: root/engine/SCons/Script
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Script')
-rw-r--r--engine/SCons/Script/Interactive.py4
-rw-r--r--engine/SCons/Script/Main.py6
-rw-r--r--engine/SCons/Script/SConsOptions.py20
-rw-r--r--engine/SCons/Script/SConscript.py4
-rw-r--r--engine/SCons/Script/__init__.py4
5 files changed, 19 insertions, 19 deletions
diff --git a/engine/SCons/Script/Interactive.py b/engine/SCons/Script/Interactive.py
index 4f447a8..06a3794 100644
--- a/engine/SCons/Script/Interactive.py
+++ b/engine/SCons/Script/Interactive.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Interactive.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Script/Interactive.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
__doc__ = """
SCons interactive mode
diff --git a/engine/SCons/Script/Main.py b/engine/SCons/Script/Main.py
index d7c9f95..2ccc403 100644
--- a/engine/SCons/Script/Main.py
+++ b/engine/SCons/Script/Main.py
@@ -13,7 +13,7 @@ it goes here.
unsupported_python_version = (2, 3, 0)
deprecated_python_version = (2, 7, 0)
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ deprecated_python_version = (2, 7, 0)
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Main.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Script/Main.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
import SCons.compat
@@ -1358,7 +1358,7 @@ def main():
pass
parts.append(version_string("engine", SCons))
parts.append(path_string("engine", SCons))
- parts.append("Copyright (c) 2001 - 2014 The SCons Foundation")
+ parts.append("Copyright (c) 2001 - 2015 The SCons Foundation")
version = ''.join(parts)
import SConsOptions
diff --git a/engine/SCons/Script/SConsOptions.py b/engine/SCons/Script/SConsOptions.py
index 4e8fd3f..35688e1 100644
--- a/engine/SCons/Script/SConsOptions.py
+++ b/engine/SCons/Script/SConsOptions.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
import optparse
import re
@@ -319,7 +319,13 @@ class SConsOptionParser(optparse.OptionParser):
value = option.const
elif len(rargs) < nargs:
if nargs == 1:
- self.error(_("%s option requires an argument") % opt)
+ if not option.choices:
+ self.error(_("%s option requires an argument") % opt)
+ else:
+ msg = _("%s option requires an argument " % opt)
+ msg += _("(choose from %s)"
+ % ', '.join(option.choices))
+ self.error(msg)
else:
self.error(_("%s option requires %d arguments")
% (opt, nargs))
@@ -645,18 +651,12 @@ def Parser(version):
config_options = ["auto", "force" ,"cache"]
- def opt_config(option, opt, value, parser, c_options=config_options):
- if not value in c_options:
- raise OptionValueError(opt_invalid('config', value, c_options))
- setattr(parser.values, option.dest, value)
-
opt_config_help = "Controls Configure subsystem: %s." \
% ", ".join(config_options)
op.add_option('--config',
- nargs=1, type="string",
+ nargs=1, choices=config_options,
dest="config", default="auto",
- action="callback", callback=opt_config,
help = opt_config_help,
metavar="MODE")
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py
index a0f6569..2818aec 100644
--- a/engine/SCons/Script/SConscript.py
+++ b/engine/SCons/Script/SConscript.py
@@ -6,7 +6,7 @@ files.
"""
#
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ files.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import division
-__revision__ = "src/engine/SCons/Script/SConscript.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Script/SConscript.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
import SCons
import SCons.Action
diff --git a/engine/SCons/Script/__init__.py b/engine/SCons/Script/__init__.py
index 74c6f58..d068e01 100644
--- a/engine/SCons/Script/__init__.py
+++ b/engine/SCons/Script/__init__.py
@@ -12,7 +12,7 @@ it goes here.
"""
#
-# Copyright (c) 2001 - 2014 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ it goes here.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/__init__.py 2014/09/27 12:51:43 garyo"
+__revision__ = "src/engine/SCons/Script/__init__.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog"
import time
start_time = time.time()