"""
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,
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):
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