mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-13 08:44:45 +03:00
Always redirect pkg-config stderr to DEVNULL
This commit is contained in:
parent
1de6c958df
commit
e2f61371c6
6
setup.py
6
setup.py
|
@ -255,23 +255,21 @@ def _pkg_config(name):
|
||||||
try:
|
try:
|
||||||
command_libs = [command, "--libs-only-L", name]
|
command_libs = [command, "--libs-only-L", name]
|
||||||
command_cflags = [command, "--cflags-only-I", name]
|
command_cflags = [command, "--cflags-only-I", name]
|
||||||
stderr = None
|
|
||||||
if keep_system:
|
if keep_system:
|
||||||
command_libs.append("--keep-system-libs")
|
command_libs.append("--keep-system-libs")
|
||||||
command_cflags.append("--keep-system-cflags")
|
command_cflags.append("--keep-system-cflags")
|
||||||
stderr = subprocess.DEVNULL
|
|
||||||
if not DEBUG:
|
if not DEBUG:
|
||||||
command_libs.append("--silence-errors")
|
command_libs.append("--silence-errors")
|
||||||
command_cflags.append("--silence-errors")
|
command_cflags.append("--silence-errors")
|
||||||
libs = re.split(
|
libs = re.split(
|
||||||
r"(^|\s+)-L",
|
r"(^|\s+)-L",
|
||||||
subprocess.check_output(command_libs, stderr=stderr)
|
subprocess.check_output(command_libs, stderr=subprocess.DEVNULL)
|
||||||
.decode("utf8")
|
.decode("utf8")
|
||||||
.strip(),
|
.strip(),
|
||||||
)[::2][1:]
|
)[::2][1:]
|
||||||
cflags = re.split(
|
cflags = re.split(
|
||||||
r"(^|\s+)-I",
|
r"(^|\s+)-I",
|
||||||
subprocess.check_output(command_cflags, stderr=stderr)
|
subprocess.check_output(command_cflags, stderr=subprocess.DEVNULL)
|
||||||
.decode("utf8")
|
.decode("utf8")
|
||||||
.strip(),
|
.strip(),
|
||||||
)[::2][1:]
|
)[::2][1:]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user