diff options
author | Steven Knight <knight@baldmt.com> | 2005-10-09 04:47:13 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-10-09 04:47:13 (GMT) |
commit | 435130568f78858e4d122c2ff2d1de7eb25feb80 (patch) | |
tree | 8f39aa9594bbeecb09e57a6b121e7fade567b147 /src | |
parent | 5ab67031831fd47ce778e0270fa460453ff9fd4f (diff) | |
download | SCons-435130568f78858e4d122c2ff2d1de7eb25feb80.zip SCons-435130568f78858e4d122c2ff2d1de7eb25feb80.tar.gz SCons-435130568f78858e4d122c2ff2d1de7eb25feb80.tar.bz2 |
Get rid of the last tabs in the source files and have the TestSCons infrastructure use the python -tt option when executing SCons to make sure they do not recur.
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 4 | ||||
-rw-r--r-- | src/engine/SCons/Action.py | 6 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 12 | ||||
-rw-r--r-- | src/engine/SCons/Optik/option.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Optik/option_parser.py | 14 | ||||
-rw-r--r-- | src/engine/SCons/Tool/msvs.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/tex.py | 6 |
7 files changed, 26 insertions, 22 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 383be62..b169fde 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -349,6 +349,10 @@ RELEASE 0.97 - XXX throw a KeyError if we were able to delte the variable from any Environment in the stack. + - Get rid of the last indentation tabs in the SCons source files and + add -tt to the Python invocations in the packaging build and the + tests so they don't creep back in. + From Chen Lee: - Handle Visual Studio project and solution files in Unicode. diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index 0bbcc3a..98de34e 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -409,8 +409,8 @@ class CommandAction(_ActionAction): if c: return c cmd_list, ignore, silent = self.process(target, source, env) - if silent: - return '' + if silent: + return '' return _string_from_cmd_list(cmd_list[0]) def execute(self, target, source, env): @@ -462,7 +462,7 @@ class CommandAction(_ActionAction): # reasonable for just about everything else: ENV[key] = str(value) - cmd_list, ignore, silent = self.process(target, map(rfile, source), env) + cmd_list, ignore, silent = self.process(target, map(rfile, source), env) # Use len() to filter out any "command" that's zero-length. for cmd_line in filter(len, cmd_list): diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 08e085d..b4e8aac 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -791,12 +791,12 @@ class Base(SubstitutionEnvironment): return None def Dictionary(self, *args): - if not args: - return self._dict - dlist = map(lambda x, s=self: s._dict[x], args) - if len(dlist) == 1: - dlist = dlist[0] - return dlist + if not args: + return self._dict + dlist = map(lambda x, s=self: s._dict[x], args) + if len(dlist) == 1: + dlist = dlist[0] + return dlist def Dump(self, key = None): """ diff --git a/src/engine/SCons/Optik/option.py b/src/engine/SCons/Optik/option.py index 2e1ec33..7493205 100644 --- a/src/engine/SCons/Optik/option.py +++ b/src/engine/SCons/Optik/option.py @@ -346,8 +346,8 @@ class Option: if self.nargs == 1: value = self.check_value(opt, value) else: - def cv(v,check=self.check_value,o=opt): - return check(o,v) + def cv(v,check=self.check_value,o=opt): + return check(o,v) value = tuple(map(cv,value)) diff --git a/src/engine/SCons/Optik/option_parser.py b/src/engine/SCons/Optik/option_parser.py index 94375d0..49b1874 100644 --- a/src/engine/SCons/Optik/option_parser.py +++ b/src/engine/SCons/Optik/option_parser.py @@ -530,8 +530,8 @@ class OptionParser: (basename of sys.argv[0]). Does nothing if self.usage is empty or not defined. """ - if file is None: - file = sys.stdout + if file is None: + file = sys.stdout if self.usage: usage = string.replace(self.usage,"%prog", get_prog_name()) file.write(usage + "\n") @@ -544,8 +544,8 @@ class OptionParser: of "%prog" in self.version is replaced by the current program's name. Does nothing if self.version is empty or undefined. """ - if file is None: - file = sys.stdout + if file is None: + file = sys.stdout if self.version: version = string.replace(self.version,"%prog", get_prog_name()) file.write(version+"\n") @@ -649,10 +649,10 @@ def _match_abbrev (s, wordmap): else: # Isolate all words with s as a prefix. possibilities = [] - ls = len(s) - for word in wordmap.keys(): + ls = len(s) + for word in wordmap.keys(): if len(word)>=ls and word[:ls]==s: - possibilities.append(word) + possibilities.append(word) # No exact match, so there had better be just one possibility. if len(possibilities) == 1: return possibilities[0] diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index 280c456..5542a88 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -197,7 +197,7 @@ class _DSPGenerator: for v in variants: outdir.append(s) - self.sconscript = env['MSVSSCONSCRIPT'] + self.sconscript = env['MSVSSCONSCRIPT'] self.env = env diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index db2664a..adb6c06 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -81,7 +81,7 @@ def is_LaTeX(flist): for f in flist: content = f.get_contents() if LaTeX_re.search(content): - return 1 + return 1 return 0 def TeXLaTeXFunction(target = None, source= None, env=None): @@ -89,9 +89,9 @@ def TeXLaTeXFunction(target = None, source= None, env=None): decide the "flavor" of the source and then executes the appropriate program.""" if is_LaTeX(source): - LaTeXAuxAction(target,source,env) + LaTeXAuxAction(target,source,env) else: - TeXAction(target,source,env) + TeXAction(target,source,env) return 0 TeXLaTeXAction = SCons.Action.Action(TeXLaTeXFunction, |