diff --git a/setup.py b/setup.py index 74d0083ca..00eb62b00 100755 --- a/setup.py +++ b/setup.py @@ -158,8 +158,13 @@ def _pkg_config(name): if not DEBUG: command_libs.append('--silence-errors') command_cflags.append('--silence-errors') - libs = subprocess.check_output(command_libs).decode('utf8').strip().replace('-L', '') - cflags = subprocess.check_output(command_cflags).decode('utf8').strip().replace('-I', '') + + libs = subprocess.check_output(command_libs).decode('utf8').strip() + libs = libs.replace('-L', '') + + cflags = subprocess.check_output(command_cflags).decode('utf8').strip() + cflags = cflags.replace('-I', '') + return (libs, cflags) except Exception: pass