From: managan Date: Mon, 22 Sep 2008 19:43:02 +0000 (+0000) Subject: Fix the Latex scanner to search for graphics on the TEXINPUTS path X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1dc2f1c53aa5c03374729ee1e2f618729eb3fab;p=scons.git Fix the Latex scanner to search for graphics on the TEXINPUTS path 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 --- diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index 30845054..fca845bf 100644 --- a/src/engine/SCons/Scanner/LaTeX.py +++ b/src/engine/SCons/Scanner/LaTeX.py @@ -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'} diff --git a/src/engine/SCons/Scanner/LaTeXTests.py b/src/engine/SCons/Scanner/LaTeXTests.py index 9cfe3ca0..44758341 100644 --- a/src/engine/SCons/Scanner/LaTeXTests.py +++ b/src/engine/SCons/Scanner/LaTeXTests.py @@ -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)