Fix syntax and semantic errors preventing regression tests from running on 1.5.2
authorGregNoel <GregNoel@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 22 Sep 2008 08:28:28 +0000 (08:28 +0000)
committerGregNoel <GregNoel@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 22 Sep 2008 08:28:28 +0000 (08:28 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@3450 fdb21ef1-2011-0410-befe-b5e4ea1792b1

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

index c544108892a65cf3bfe15f5139c962c01fb96e2d..30845054f7c98786b8d25aa436acbdde6c576b44 100644 (file)
@@ -126,16 +126,17 @@ class LaTeX(SCons.Scanner.Base):
             """
             def __init__(self, dictionary):
                 self.dictionary = {}
-                for k, n  in dictionary.iteritems():
+                for k,n in dictionary.items():
                     self.dictionary[k] = SCons.Scanner.FindPathDirs(n)
-            def __call__(self, env, dir=None, target=None, source=None, argument=None):
+
+            def __call__(self, env, dir=None, target=None, source=None,
+                                    argument=None):
                 di = {}
-                for k, c  in self.dictionary.iteritems():
-                    p = c(env, dir=None, target=None, source=None, argument=None)
-                    di[k] = p
+                for k,c  in self.dictionary.items():
+                    di[k] = c(env, dir=None, target=None, source=None,
+                                   argument=None)
                 # To prevent "dict is not hashable error"
-                rv = tuple([(k,v) for k, v in di.iteritems()])
-                return rv
+                return tuple(di.items())
 
         class LaTeXScanCheck:
             """Skip all but LaTeX source files, i.e., do not scan *.eps,
@@ -177,7 +178,8 @@ class LaTeX(SCons.Scanner.Base):
         if include[0] == 'includegraphics':
             base, ext = os.path.splitext( filename )
             if ext == "":
-                return [filename + e for e in self.graphics_extensions]
+                #FUTURE return [filename + e for e in self.graphics_extensions]
+                return map(lambda e, f=filename: f+e, self.graphics_extensions)
         return [filename]
 
     def sort_key(self, include):
index 59980e5c50d05c322b413153aa436b6c854bd2b1..72d925bbdd436d56d6172cd7f2a2f48685cb8b5e 100644 (file)
@@ -128,10 +128,12 @@ def modify_env_var(env, var, abspath):
     env.PrependENVPath(var, abspath)
     try:
         if SCons.Util.is_List(env[var]):
-            env.PrependENVPath(var, [os.path.abspath(str(p)) for p in env[var]])
+            #FUTURE 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
-            env.PrependENVPath(var, [os.path.abspath(p) for p in str(env[var]).split(os.pathsep)])
+            #FUTURE 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)))
     except KeyError:
         pass
     # Convert into a string explicitly to append ":" (without which it won't search system