summaryrefslogtreecommitdiff
path: root/engine/SCons/Script
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-12-28 14:18:55 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-12-28 14:18:55 +0100
commit6298ea00640a74af4eecbf3528ea87bd191a2eba (patch)
tree6f9badf5b8f69055849260093eb76ce184e746ef /engine/SCons/Script
parent0809a628a8aa042fe6bb225d4d70e63f289eaafb (diff)
parent5d14e9e6b9aa6c884d8a4787cd248c9ab3612962 (diff)
Konflikte behobendebian/3.1.2-1
Diffstat (limited to 'engine/SCons/Script')
-rw-r--r--engine/SCons/Script/Interactive.py2
-rw-r--r--engine/SCons/Script/Main.py11
-rw-r--r--engine/SCons/Script/SConsOptions.py24
-rw-r--r--engine/SCons/Script/SConscript.py26
-rw-r--r--engine/SCons/Script/__init__.py5
5 files changed, 38 insertions, 30 deletions
diff --git a/engine/SCons/Script/Interactive.py b/engine/SCons/Script/Interactive.py
index c756461..b2c134c 100644
--- a/engine/SCons/Script/Interactive.py
+++ b/engine/SCons/Script/Interactive.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import print_function
-__revision__ = "src/engine/SCons/Script/Interactive.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+__revision__ = "src/engine/SCons/Script/Interactive.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
__doc__ = """
SCons interactive mode
diff --git a/engine/SCons/Script/Main.py b/engine/SCons/Script/Main.py
index 663e337..5b7406c 100644
--- a/engine/SCons/Script/Main.py
+++ b/engine/SCons/Script/Main.py
@@ -38,7 +38,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 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+__revision__ = "src/engine/SCons/Script/Main.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.compat
@@ -75,6 +75,7 @@ print_objects = 0
print_memoizer = 0
print_stacktrace = 0
print_time = 0
+print_action_timestamps = 0
sconscript_time = 0
cumulative_command_time = 0
exit_status = 0 # final exit status, assume success by default
@@ -209,6 +210,9 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
finish_time = time.time()
last_command_end = finish_time
cumulative_command_time = cumulative_command_time+finish_time-start_time
+ if print_action_timestamps:
+ sys.stdout.write("Command execution start timestamp: %s: %f\n"%(str(self.node), start_time))
+ sys.stdout.write("Command execution end timestamp: %s: %f\n"%(str(self.node), finish_time))
sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time))
def do_failed(self, status=2):
@@ -636,7 +640,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None):
return None
def _set_debug_values(options):
- global print_memoizer, print_objects, print_stacktrace, print_time
+ global print_memoizer, print_objects, print_stacktrace, print_time, print_action_timestamps
debug_values = options.debug
@@ -674,6 +678,9 @@ def _set_debug_values(options):
options.tree_printers.append(TreePrinter(status=True))
if "time" in debug_values:
print_time = 1
+ if "action-timestamps" in debug_values:
+ print_time = 1
+ print_action_timestamps = 1
if "tree" in debug_values:
options.tree_printers.append(TreePrinter())
if "prepare" in debug_values:
diff --git a/engine/SCons/Script/SConsOptions.py b/engine/SCons/Script/SConsOptions.py
index ae08d41..e7a3fc1 100644
--- a/engine/SCons/Script/SConsOptions.py
+++ b/engine/SCons/Script/SConsOptions.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Script/SConsOptions.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import optparse
import re
@@ -584,9 +584,15 @@ def Parser(version):
help="Print build actions for files from CacheDir.")
def opt_invalid(group, value, options):
+ """report an invalid option from a group"""
errmsg = "`%s' is not a valid %s option type, try:\n" % (value, group)
return errmsg + " %s" % ", ".join(options)
+ def opt_invalid_rm(group, value, msg):
+ """report an invalid option from a group: recognized but removed"""
+ errmsg = "`%s' is not a valid %s option type " % (value, group)
+ return errmsg + msg
+
config_options = ["auto", "force" ,"cache"]
opt_config_help = "Controls Configure subsystem: %s." \
@@ -604,9 +610,11 @@ def Parser(version):
help="Search up directory tree for SConstruct, "
"build all Default() targets.")
- deprecated_debug_options = {
+ deprecated_debug_options = {}
+
+ removed_debug_options = {
"dtree" : '; please use --tree=derived instead',
- "nomemoizer" : ' and has no effect',
+ "nomemoizer" : '; there is no replacement',
"stree" : '; please use --tree=all,status instead',
"tree" : '; please use --tree=all instead',
}
@@ -614,15 +622,16 @@ def Parser(version):
debug_options = ["count", "duplicate", "explain", "findlibs",
"includes", "memoizer", "memory", "objects",
"pdb", "prepare", "presub", "stacktrace",
- "time"]
+ "time", "action-timestamps"]
def opt_debug(option, opt, value__, parser,
debug_options=debug_options,
- deprecated_debug_options=deprecated_debug_options):
+ deprecated_debug_options=deprecated_debug_options,
+ removed_debug_options=removed_debug_options):
for value in value__.split(','):
if value in debug_options:
parser.values.debug.append(value)
- elif value in list(deprecated_debug_options.keys()):
+ elif value in deprecated_debug_options:
parser.values.debug.append(value)
try:
parser.values.delayed_warnings
@@ -632,6 +641,9 @@ def Parser(version):
w = "The --debug=%s option is deprecated%s." % (value, msg)
t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w)
parser.values.delayed_warnings.append(t)
+ elif value in removed_debug_options:
+ msg = removed_debug_options[value]
+ raise OptionValueError(opt_invalid_rm('debug', value, msg))
else:
raise OptionValueError(opt_invalid('debug', value, debug_options))
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py
index c0a75f2..97073ba 100644
--- a/engine/SCons/Script/SConscript.py
+++ b/engine/SCons/Script/SConscript.py
@@ -27,7 +27,7 @@ files.
# 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/SConscript.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+__revision__ = "src/engine/SCons/Script/SConscript.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons
import SCons.Action
@@ -42,7 +42,7 @@ import SCons.Platform
import SCons.SConf
import SCons.Script.Main
import SCons.Tool
-import SCons.Util
+from SCons.Util import is_List, is_String, is_Dict, flatten
from . import Main
@@ -98,7 +98,7 @@ def compute_exports(exports):
retval = {}
try:
for export in exports:
- if SCons.Util.is_Dict(export):
+ if is_Dict(export):
retval.update(export)
else:
try:
@@ -133,7 +133,7 @@ call_stack = []
def Return(*vars, **kw):
retval = []
try:
- fvars = SCons.Util.flatten(vars)
+ fvars = flatten(vars)
for var in fvars:
for v in var.split():
retval.append(call_stack[-1].globals[v])
@@ -420,7 +420,7 @@ class SConsEnvironment(SCons.Environment.Base):
except KeyError:
raise SCons.Errors.UserError("Invalid SConscript usage - no parameters")
- if not SCons.Util.is_List(dirs):
+ if not is_List(dirs):
dirs = [ dirs ]
dirs = list(map(str, dirs))
@@ -441,13 +441,13 @@ class SConsEnvironment(SCons.Environment.Base):
raise SCons.Errors.UserError("Invalid SConscript() usage - too many arguments")
- if not SCons.Util.is_List(files):
+ if not is_List(files):
files = [ files ]
if kw.get('exports'):
exports.extend(self.Split(kw['exports']))
- variant_dir = kw.get('variant_dir') or kw.get('build_dir')
+ variant_dir = kw.get('variant_dir')
if variant_dir:
if len(files) != 1:
raise SCons.Errors.UserError("Invalid SConscript() usage - can only specify one SConscript with a variant_dir")
@@ -577,9 +577,6 @@ class SConsEnvironment(SCons.Environment.Base):
UserError: a script is not found and such exceptions are enabled.
"""
- if 'build_dir' in kw:
- msg = """The build_dir keyword has been deprecated; use the variant_dir keyword instead."""
- SCons.Warnings.warn(SCons.Warnings.DeprecatedBuildDirWarning, msg)
def subst_element(x, subst=self.subst):
if SCons.Util.is_List(x):
x = list(map(subst, x))
@@ -589,15 +586,10 @@ class SConsEnvironment(SCons.Environment.Base):
ls = list(map(subst_element, ls))
subst_kw = {}
for key, val in kw.items():
- if SCons.Util.is_String(val):
+ if is_String(val):
val = self.subst(val)
elif SCons.Util.is_List(val):
- result = []
- for v in val:
- if SCons.Util.is_String(v):
- v = self.subst(v)
- result.append(v)
- val = result
+ val = [self.subst(v) if is_String(v) else v for v in val]
subst_kw[key] = val
files, exports = self._get_SConscript_filenames(ls, subst_kw)
diff --git a/engine/SCons/Script/__init__.py b/engine/SCons/Script/__init__.py
index cb44f2b..5292c10 100644
--- a/engine/SCons/Script/__init__.py
+++ b/engine/SCons/Script/__init__.py
@@ -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 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"
+__revision__ = "src/engine/SCons/Script/__init__.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import time
start_time = time.time()
@@ -314,7 +314,6 @@ GlobalDefaultEnvironmentFunctions = [
'AddPreAction',
'Alias',
'AlwaysBuild',
- 'BuildDir',
'CacheDir',
'Clean',
#The Command() method is handled separately, below.
@@ -346,10 +345,8 @@ GlobalDefaultEnvironmentFunctions = [
'SConsignFile',
'SideEffect',
'SourceCode',
- 'SourceSignatures',
'Split',
'Tag',
- 'TargetSignatures',
'Value',
'VariantDir',
]