From 0c1720d3588ac5f95740f7fa34b1bad1b3fac7ad Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 3 May 2022 09:19:09 +1000 Subject: [PATCH] Hide stderr from --keep-system-libs --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 37bb2ceb8..2701aa1ce 100755 --- a/setup.py +++ b/setup.py @@ -255,14 +255,16 @@ def _pkg_config(name): try: command_libs = [command, "--libs-only-L", name] command_cflags = [command, "--cflags-only-I", name] + stderr = None if keep_system: command_libs.append("--keep-system-libs") command_cflags.append("--keep-system-cflags") + stderr = subprocess.DEVNULL if not DEBUG: command_libs.append("--silence-errors") command_cflags.append("--silence-errors") libs = ( - subprocess.check_output(command_libs) + subprocess.check_output(command_libs, stderr=stderr) .decode("utf8") .strip() .replace("-L", "")