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.
This commit is contained in:
Georg Baum 2016-05-10 07:18:48 +02:00
parent 38e9752c01
commit a1cc936548

View 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")