Skip to content

Commit 0c1720d

Browse files
committed
Hide stderr from --keep-system-libs
1 parent 9d988da commit 0c1720d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,16 @@ def _pkg_config(name):
255255
try:
256256
command_libs = [command, "--libs-only-L", name]
257257
command_cflags = [command, "--cflags-only-I", name]
258+
stderr = None
258259
if keep_system:
259260
command_libs.append("--keep-system-libs")
260261
command_cflags.append("--keep-system-cflags")
262+
stderr = subprocess.DEVNULL
261263
if not DEBUG:
262264
command_libs.append("--silence-errors")
263265
command_cflags.append("--silence-errors")
264266
libs = (
265-
subprocess.check_output(command_libs)
267+
subprocess.check_output(command_libs, stderr=stderr)
266268
.decode("utf8")
267269
.strip()
268270
.replace("-L", "")

0 commit comments

Comments
 (0)