From f26a39c4d6bd123f3a8bb9834fb82cf6d9033c18 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Wed, 12 Nov 2008 00:00:56 +0000 Subject: Python 1.5 and 2.1 compatibility: string methods, nested scopes. --- src/engine/SCons/Scanner/LaTeX.py | 9 ++++++--- src/engine/SCons/Tool/tex.py | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index df81497..c499ea5 100644 --- a/src/engine/SCons/Scanner/LaTeX.py +++ b/src/engine/SCons/Scanner/LaTeX.py @@ -58,12 +58,13 @@ def modify_env_var(env, var, abspath): env.PrependENVPath(var, abspath) try: if SCons.Util.is_List(env[var]): - #TODO(1.5) env.PrependENVPath(var, [os.path.abspath(str(p)) for p in env[var]]) + #TODO(1.5) + #env.PrependENVPath(var, [os.path.abspath(str(p)) for p in env[var]]) env.PrependENVPath(var, map(lambda p: os.path.abspath(str(p)), env[var])) else: # Split at os.pathsep to convert into absolute path #TODO(1.5) env.PrependENVPath(var, [os.path.abspath(p) for p in str(env[var]).split(os.pathsep)]) - env.PrependENVPath(var, map(lambda p: os.path.abspath(p), str(env[var]).split(os.pathsep))) + env.PrependENVPath(var, map(lambda p: os.path.abspath(p), string.split(str(env[var]), os.pathsep))) except KeyError: pass @@ -72,7 +73,9 @@ def modify_env_var(env, var, abspath): # does not work, refuses to append ":" (os.pathsep). if SCons.Util.is_List(env['ENV'][var]): - env['ENV'][var] = os.pathsep.join(env['ENV'][var]) + # TODO(1.5) + #env['ENV'][var] = os.pathsep.join(env['ENV'][var]) + env['ENV'][var] = string.join(env['ENV'][var], os.pathsep) # Append the trailing os.pathsep character here to catch the case with no env[var] env['ENV'][var] = env['ENV'][var] + os.pathsep diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index d033fdd..c285d3b 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -217,7 +217,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None # # routine to update MD5 hash and compare # - def check_MD5(filenode, suffix, saved_hashes=saved_hashes): + # TODO(1.5): nested scopes + def check_MD5(filenode, suffix, saved_hashes=saved_hashes, targetbase=targetbase): global must_rerun_latex # two calls to clear old csig filenode.clear_memoized_values() -- cgit v0.12