Currently, configure.py prints output to STDERR, even though they are
not necessarily warnings or errors.

The attached patch changes it to print to STDOUT.

Without the patch, a command like the following:

python3 -tt /home/scott/lyxbuilds/master-master/repo/lib/configure.py > 
/dev/null

even though it redirects STDOUT, would still print to the terminal:

+Running LyX configure with Python 3.12.3
checking for a Latex2e program...
+checking for "latex"...  yes
checking for pLaTeX, the Japanese LaTeX...
+checking for "uplatex"...  yes
checking for a java interpreter...
+checking for "java"...  yes
checking for a perl interpreter...
+checking for "perl"...  yes
checking for xsltproc...
+checking for "xsltproc"...  yes
checking for a Tgif viewer and editor...
+checking for "tgif"...  no
checking for a FIG viewer and editor...
+checking for "xfig"...  no
+checking for "jfig3-itext.jar"...  no
+checking for "jfig3.jar"...  no
checking for a Dia viewer and editor...
+checking for "dia"...  yes
...

Is the patch OK?

Scott
From 38fc0c3ba5ab0cf82c2ae764e62b16c8dd9fb769 Mon Sep 17 00:00:00 2001
From: Scott Kostyshak <skost...@lyx.org>
Date: Thu, 26 Jun 2025 00:12:32 +0200
Subject: [PATCH] configure: print to STDOUT, not STDERR

---
 lib/configure.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/configure.py b/lib/configure.py
index d86aa863de..f0ca1ff0d0 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -16,7 +16,7 @@ logging.basicConfig(level = logging.DEBUG,
     filemode = 'w')
 #
 # Add a handler to log to console
-console = logging.StreamHandler()
+console = logging.StreamHandler(sys.stdout)
 console.setLevel(logging.INFO) # the console only print out general information
 formatter = logging.Formatter('%(message)s') # only print out the message itself
 console.setFormatter(formatter)
-- 
2.43.0

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to