Python 1.5 and 2.1 compatibility: string methods, nested scopes.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 12 Nov 2008 00:00:56 +0000 (00:00 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 12 Nov 2008 00:00:56 +0000 (00:00 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@3780 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Scanner/LaTeX.py
src/engine/SCons/Tool/tex.py

index df81497204be95882e8ec5aed402e46272e3d0d0..c499ea581080467fee5db474c4174d58bb9a48ae 100644 (file)
@@ -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
 
index d033fdd9338332a171697908cdda56372238522a..c285d3b229a3acd9ea3615f1b5f86cbd4f4612ce 100644 (file)
@@ -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()