From a3c92632f5faea66fa4086ca73c2b42c8dce2bc4 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 31 Mar 2022 12:20:31 +0200 Subject: [PATCH] Print only errors and only to stderr --- radio/util/find_clang.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/radio/util/find_clang.py b/radio/util/find_clang.py index 89e2a2e6a..3a557d21a 100644 --- a/radio/util/find_clang.py +++ b/radio/util/find_clang.py @@ -45,7 +45,7 @@ def getBuiltinHeaderPath(library_path): subDirs = [f for f in os.listdir(path) if os.path.isdir(path + "/" + f)] subDirs = sorted(subDirs) or ['.'] path = path + "/" + subDirs[-1] + "/include" - print("searching builtins in " + path) + #print("searching builtins in " + path) if canFindBuiltinHeaders(index, ["-I" + path]): return path except: @@ -89,13 +89,13 @@ def initLibClang(): library_path = findLibClang() if library_path: - print("libclang found: " + library_path) + #print("libclang found: " + library_path) if os.path.isdir(library_path): Config.set_library_path(library_path) else: Config.set_library_file(library_path) else: - print("ERROR: libclang not found!") + print("ERROR: libclang not found!", file=sys.stderr) return False Config.set_compatibility_check(False) @@ -103,13 +103,13 @@ def initLibClang(): try: index = Index.create() except Exception as e: - print("ERROR: could not load libclang from '%s'." % library_path) + print("ERROR: could not load libclang from '%s'." % library_path, file=sys.stderr) return False global builtin_hdr_path builtin_hdr_path = getBuiltinHeaderPath(library_path) if not builtin_hdr_path: - print("ERROR: builtin header path not found") + print("ERROR: builtin header path not found", file=sys.stderr) return False # Everything is OK, libclang can be used