summaryrefslogtreecommitdiff
path: root/engine/SCons/Script/SConscript.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 15:56:14 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 15:56:14 +0100
commit0d31d7cdc6ebdbaff868a8a03690afe1a8e8a4db (patch)
tree42e1a6f9b34cfcb4f2908d27506ebb78c1e36198 /engine/SCons/Script/SConscript.py
parent5ed7f9cf4e33468b3b75e057db461b30a81febe4 (diff)
parente18cb63b889697e54fe06be3eef8889b39f9fb4b (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'engine/SCons/Script/SConscript.py')
-rw-r--r--engine/SCons/Script/SConscript.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py
index 350772e..b366c4c 100644
--- a/engine/SCons/Script/SConscript.py
+++ b/engine/SCons/Script/SConscript.py
@@ -5,8 +5,6 @@ files.
"""
-from __future__ import print_function
-
#
# Copyright (c) 2001 - 2017 The SCons Foundation
#
@@ -29,7 +27,7 @@ from __future__ import print_function
# 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 rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/Script/SConscript.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
import SCons
import SCons.Action
@@ -46,12 +44,15 @@ import SCons.Script.Main
import SCons.Tool
import SCons.Util
+from . import Main
+
import collections
import os
import os.path
import re
import sys
import traceback
+import time
class SConscriptReturn(Exception):
pass
@@ -249,11 +250,17 @@ def _SConscript(fs, *files, **kw):
try:
try:
# _file_ = SCons.Util.to_str(_file_)
+ if Main.print_time:
+ time1 = time.time()
exec(compile(_file_.read(), _file_.name, 'exec'),
call_stack[-1].globals)
except SConscriptReturn:
pass
finally:
+ if Main.print_time:
+ time2 = time.time()
+ print('SConscript:%s took %0.3f ms' % (f.get_abspath(), (time2 - time1) * 1000.0))
+
if old_file is not None:
call_stack[-1].globals.update({__file__:old_file})
else: