On Wednesday 20 September 2006 13:57, Rainer Dorsch wrote: > José, > > did you apply this patch. I compiled 1.4.3svn and still get > > Checking whether TeX allows spaces in file names... > Traceback (most recent call last): > > File > "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py", > line 730, in ? > checkTeXAllowSpaces() > > File > "/afs/bb/data/d3197/galaxy2/zLinux/lyx-1.4.3pre/share/lyx/configure.py", > line 655, in checkTeXAllowSpaces > if 'working' in latex_out: > TypeError: 'in <string>' requires character as left operand > LyX: Done!
The patch I sent has this issue fixed. I send the patch again attached. The patch is against the latest svn version. Could you try and see if the attached patch works. It is the only way to ask Jean-Marc to included it in the stable series. This code only applies to 1.4.x since for 1.5.x we require python 2.3 where this code runs. > Apparently the support for QT 3.0.5 patch was applied by Enrico. > > Thanks, > Rainer -- José Abílio
Index: configure.py =================================================================== --- configure.py (revision 15093) +++ configure.py (working copy) @@ -106,7 +106,7 @@ os.close(fd) inpname = cmdOutput('cygpath -m ' + tmpfname) latex_out = cmdOutput(r'latex "\nonstopmode\input{%s}"' % inpname) - if 'Error' in latex_out: + if latex_out.find('Error') != -1: print "configure: TeX engine needs posix-style paths in latex files" windows_style_tex_paths = 'false' else: @@ -579,7 +579,10 @@ for line in open('chkconfig.vars').readlines(): key, val = re.sub('-', '_', line).split('=') val = val.strip() - values[key] = val.strip("'") + tmp = val.split("'") + while tmp and not tmp[0]: tmp = tmp[1:] + while tmp and not tmp[-1]: tmp = tmp[:-1] + values[key] = "'".join(tmp) # chk_fontenc may not exist try: addToRC(r'\font_encoding "%s"' % values["chk_fontenc"]) @@ -652,7 +655,7 @@ latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """) else: latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """) - if 'working' in latex_out: + if latex_out.find('working') != -1: print 'yes' tex_allows_spaces = 'true' else: