commit 77670bc9983392e32abb1cec236e5741b4d8c84b
Author: Stephan Witt <sw...@lyx.org>
Date:   Fri Dec 31 13:40:22 2021 +0100

    Reduce the mix of python versions in configure.py in case of running it 
with python3
---
 lib/configure.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index bddb94c..7d9b61c 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1293,7 +1293,7 @@ def checkConverterEntries():
     if lilypond_book:
         found_lilypond_book = False
         # On Windows, the file lilypond-book is not directly callable, it must 
be passed as argument to python.
-        for cmd in ["lilypond-book", "python \"" + path + "/lilypond-book\""]:
+        for cmd in ["lilypond-book", os.path.basename(sys.executable) + ' "' + 
path + '/lilypond-book"']:
             version_string = cmdOutput(cmd + " --version")
             if len(version_string) == 0:
                 continue
@@ -1331,9 +1331,8 @@ def checkConverterEntries():
 
                     logger.info('+  found LilyPond-book version %s.' % 
version_number)
 
-                    # early exit on first match, avoid 2nd try with 
problematic python call
-                    # 1) in case of configure.py called with "python3" 
hardcoded "python" call is wrong
-                    # 2) in case of lilypond-book being an executable or shell 
script the python call is useless
+                    # early exit on first match, avoid 2nd try with python call
+                    # in case of lilypond-book being an executable or shell 
script the python call is useless
                     break
                 else:
                     logger.info('+  found LilyPond-book, but version %s is too 
old.' % version_number)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to