From 1b391f35cdd1f5e81e161727ba299f770152ffdc Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sat, 15 Nov 2008 13:56:57 +0000 Subject: [PATCH] do not try to run platex if it has not been found git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27450 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/configure.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 993c7cf15c..3525588976 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -73,7 +73,7 @@ def setEnviron(): NLS nuisances. Only set these to C if already set. These must not be set unconditionally because not all systems understand e.g. LANG=C (notably SCO). - Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! + Fixing LC_MESSAGES prevents Solaris sh from translating var values in set! Non-C LC_CTYPE values break the ctype check. ''' os.environ['LANG'] = os.getenv('LANG', 'C') @@ -202,19 +202,20 @@ def checkLatex(dtl_tools): path, PPLATEX = checkProg('a DVI postprocessing program', ['pplatex $$i']) #----------------------------------------------------------------- path, PLATEX = checkProg('pLaTeX, the Japanese LaTeX', ['platex $$i']) - # check if PLATEX is pLaTeX2e - writeToFile('chklatex.ltx', ''' + if PLATEX != '': + # check if PLATEX is pLaTeX2e + writeToFile('chklatex.ltx', ''' \\nonstopmode \\@@end ''') - # run platex on chklatex.ltx and check result - if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1: - # We have the Japanese pLaTeX2e - addToRC(r'\converter platex dvi "%s" "latex"' % PLATEX) - LATEX = PLATEX - else: - PLATEX = '' - removeFiles(['chklatex.ltx', 'chklatex.log']) + # run platex on chklatex.ltx and check result + if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1: + # We have the Japanese pLaTeX2e + addToRC(r'\converter platex dvi "%s" "latex"' % PLATEX) + LATEX = PLATEX + else: + PLATEX = '' + removeFiles(['chklatex.ltx', 'chklatex.log']) #----------------------------------------------------------------- # use LATEX to convert from latex to dvi if PPLATEX is not available if PPLATEX == '': -- 2.39.2