summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script/SConscript.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2016-05-08 23:27:44 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2016-05-08 23:27:44 (GMT)
commitd86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d (patch)
tree521ddb1071569fa90100e11d7f03af13d5689aaf /src/engine/SCons/Script/SConscript.py
parent98bb69c7c9e13ea57ae7e6e8db4740a4dd43ed16 (diff)
parent6a37189174372c9c98c63ada58ab4352adf650e8 (diff)
downloadSCons-d86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d.zip
SCons-d86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d.tar.gz
SCons-d86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d.tar.bz2
merged
Diffstat (limited to 'src/engine/SCons/Script/SConscript.py')
-rw-r--r--src/engine/SCons/Script/SConscript.py27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index d50951d..6480ace 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -5,6 +5,8 @@ files.
"""
+from __future__ import print_function
+
#
# __COPYRIGHT__
#
@@ -51,16 +53,6 @@ import re
import sys
import traceback
-# The following variables used to live in this module. Some
-# SConscript files out there may have referred to them directly as
-# SCons.Script.SConscript.*. This is now supported by some special
-# handling towards the bottom of the SConscript.__init__.py module.
-#Arguments = {}
-#ArgList = []
-#BuildTargets = TargetList()
-#CommandLineTargets = []
-#DefaultTargets = []
-
class SConscriptReturn(Exception):
pass
@@ -78,7 +70,7 @@ def get_calling_namespaces():
"""Return the locals and globals for the function that called
into this module in the current call stack."""
try: 1//0
- except ZeroDivisionError:
+ except ZeroDivisionError:
# Don't start iterating with the current stack-frame to
# prevent creating reference cycles (f_back is safe).
frame = sys.exc_info()[2].tb_frame.f_back
@@ -265,7 +257,7 @@ def _SConscript(fs, *files, **kw):
call_stack[-1].globals.update({__file__:old_file})
else:
SCons.Warnings.warn(SCons.Warnings.MissingSConscriptWarning,
- "Ignoring missing SConscript '%s'" % f.path)
+ "Ignoring missing SConscript '%s'" % f.get_internal_path())
finally:
SCons.Script.sconscript_reading = SCons.Script.sconscript_reading - 1
@@ -438,7 +430,7 @@ class SConsEnvironment(SCons.Environment.Base):
fname = fn.get_path(src_dir)
files = [os.path.join(str(variant_dir), fname)]
else:
- files = [fn.abspath]
+ files = [fn.get_abspath()]
kw['src_dir'] = variant_dir
self.fs.VariantDir(variant_dir, src_dir, duplicate)
@@ -446,7 +438,7 @@ class SConsEnvironment(SCons.Environment.Base):
#
# Public methods of an SConsEnvironment. These get
- # entry points in the global name space so they can be called
+ # entry points in the global namespace so they can be called
# as global functions.
#
@@ -461,7 +453,8 @@ class SConsEnvironment(SCons.Environment.Base):
def EnsureSConsVersion(self, major, minor, revision=0):
"""Exit abnormally if the SCons version is not late enough."""
- if SCons.__version__ == '__VERSION__':
+ # split string to avoid replacement during build process
+ if SCons.__version__ == '__' + 'VERSION__':
SCons.Warnings.warn(SCons.Warnings.DevelopmentVersionWarning,
"EnsureSConsVersion is ignored for development version")
return
@@ -498,9 +491,9 @@ class SConsEnvironment(SCons.Environment.Base):
name = self.subst(name)
return SCons.Script.Main.GetOption(name)
- def Help(self, text):
+ def Help(self, text, append=False):
text = self.subst(text, raw=1)
- SCons.Script.HelpFunction(text)
+ SCons.Script.HelpFunction(text, append=append)
def Import(self, *vars):
try: