Fix the Latex scanner to search for graphics on the TEXINPUTS path
authormanagan <managan@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 22 Sep 2008 19:43:02 +0000 (19:43 +0000)
committermanagan <managan@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 22 Sep 2008 19:43:02 +0000 (19:43 +0000)
instead of TEXPICTS.
Add the LATEXSUFFIXES keyword to the DummyEnvironment calls since
the scanner needs it.

git-svn-id: http://scons.tigris.org/svn/scons/trunk@3453 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Scanner/LaTeX.py
src/engine/SCons/Scanner/LaTeXTests.py

index 30845054f7c98786b8d25aa436acbdde6c576b44..fca845bf635e20ea5ba7cb71418a2f24580565f0 100644 (file)
@@ -95,7 +95,7 @@ class LaTeX(SCons.Scanner.Base):
     """
     keyword_paths = {'include': 'TEXINPUTS',
                      'input': 'TEXINPUTS',
-                     'includegraphics': 'TEXPICTS',
+                     'includegraphics': 'TEXINPUTS',
                      'bibliography': 'BIBINPUTS',
                      'bibliographystyle': 'BSTINPUTS',
                      'usepackage': 'TEXINPUTS'}
index 9cfe3ca033aba2786a1bd0b430f7c936ad85417a..44758341e5706c79d966082361d16cb729ec3b62 100644 (file)
@@ -111,7 +111,7 @@ def deps_match(self, deps, headers):
 
 class LaTeXScannerTestCase1(unittest.TestCase):
     def runTest(self):
-        env = DummyEnvironment()
+        env = DummyEnvironment(LATEXSUFFIXES = [".tex", ".ltx", ".latex"])
         s = SCons.Scanner.LaTeX.LaTeXScanner()
         path = s.path(env)
         deps = s(env.File('test1.latex'), env, path)
@@ -120,7 +120,7 @@ class LaTeXScannerTestCase1(unittest.TestCase):
 
 class LaTeXScannerTestCase2(unittest.TestCase):
      def runTest(self):
-         env = DummyEnvironment(TEXINPUTS=[test.workpath("subdir")])
+         env = DummyEnvironment(TEXINPUTS=[test.workpath("subdir")],LATEXSUFFIXES = [".tex", ".ltx", ".latex"])
          s = SCons.Scanner.LaTeX.LaTeXScanner()
          path = s.path(env)
          deps = s(env.File('test2.latex'), env, path)
@@ -129,11 +129,11 @@ class LaTeXScannerTestCase2(unittest.TestCase):
 
 class LaTeXScannerTestCase3(unittest.TestCase):
      def runTest(self):
-         env = DummyEnvironment(TEXINPUTS=[test.workpath("subdir")])
+         env = DummyEnvironment(TEXINPUTS=[test.workpath("subdir")],LATEXSUFFIXES = [".tex", ".ltx", ".latex"])
          s = SCons.Scanner.LaTeX.LaTeXScanner()
          path = s.path(env)
          deps = s(env.File('test3.latex'), env, path)
-         files = ['subdir/inc4.eps', 'inc5.xyz']
+         files = ['inc5.xyz', 'subdir/inc4.eps']
          deps_match(self, deps, files)