X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fbook_latex.py;h=ec5412b1d8192bee41e292e31bc62a78798cc45d;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=a3b2b18b78907134b3b9c0e4035d473fc6f3d52a;hpb=058370efc7e9710f149d0f444328bb1fcd7bdec1;p=lilypond.git diff --git a/python/book_latex.py b/python/book_latex.py index a3b2b18b78..ec5412b1d8 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -200,7 +200,6 @@ def get_latex_textwidth (source, global_options): universal_newlines = True if sys.platform == 'mingw32': universal_newlines = False - if (sys.platform == 'mingw32') and (sys.version_info < (2, 6)): ### use os.system to avoid weird sleep() problems on ### GUB's python 2.4.2 on mingw # make file to write to @@ -208,7 +207,13 @@ def get_latex_textwidth (source, global_options): output_filename = os.path.join(output_dir, 'output.txt') # call command cmd += " > %s" % output_filename + oldtexinputs = os.environ.get ('TEXINPUTS') + os.environ['TEXINPUTS'] = run_env['TEXINPUTS'] returncode = os.system(cmd) + if oldtexinputs: + os.environ['TEXINPUTS'] = oldtexinputs + else: + del os.environ['TEXINPUTS'] parameter_string = open(output_filename).read() if returncode != 0: warning (_ ("Unable to auto-detect default settings:\n"))