From: stevenknight Date: Wed, 12 Nov 2008 00:00:56 +0000 (+0000) Subject: Python 1.5 and 2.1 compatibility: string methods, nested scopes. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9fec6308b06c32e6d555b0d2283307c3899d7c3b;p=scons.git Python 1.5 and 2.1 compatibility: string methods, nested scopes. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3780 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index df814972..c499ea58 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 d033fdd9..c285d3b2 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()