Skip to content

Commit

Permalink
Merge pull request #6261 from radarhere/stderr
Browse files Browse the repository at this point in the history
Hide stderr from --keep-system-libs
  • Loading branch information
hugovk committed May 4, 2022
2 parents 3aef70c + 0c1720d commit e42d8b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Expand Up @@ -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", "")
Expand Down

0 comments on commit e42d8b0

Please sign in to comment.