From a1cc93654873736194891bbc18fbce441c1f1516 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 10 May 2016 07:18:48 +0200 Subject: [PATCH] Ensure that TeXFiles.py is run by python2 We ensure that configure.py is called by python2, regardless whether 'python' is python 2 or 3. Therefore we can simply call TeXFiles.py with the currently running interpreter. This fixes configuration on systems where 'python' is python 3. --- lib/configure.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/configure.py b/lib/configure.py index 0dcc4ce105..cd2a0c5aa5 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1522,7 +1522,10 @@ def rescanTeXFiles(): if not os.path.isfile( os.path.join(srcdir, 'scripts', 'TeXFiles.py') ): logger.error("configure: error: cannot find TeXFiles.py script") sys.exit(1) - tfp = cmdOutput("python -tt " + '"' + os.path.join(srcdir, 'scripts', 'TeXFiles.py') + '"') + interpreter = sys.executable + if interpreter == '': + interpreter = "python" + tfp = cmdOutput(interpreter + " -tt " + '"' + os.path.join(srcdir, 'scripts', 'TeXFiles.py') + '"') logger.info(tfp) logger.info("\tdone") -- 2.39.5