]> git.lyx.org Git - features.git/commitdiff
Ensure that TeXFiles.py is run by python2
authorGeorg Baum <baum@lyx.org>
Tue, 10 May 2016 05:18:48 +0000 (07:18 +0200)
committerGeorg Baum <baum@lyx.org>
Tue, 10 May 2016 05:18:48 +0000 (07:18 +0200)
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

index 0dcc4ce1058128edf25a6f0eb3e0565bb92b7b88..cd2a0c5aa56a9c731935ac19402bbb4f8cba708c 100644 (file)
@@ -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")