mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-28 01:42:52 +03:00
Fix pkg-config call
This commit is contained in:
parent
c28bf86b7e
commit
9bdb9d8bef
13
setup.py
13
setup.py
|
@ -147,15 +147,20 @@ LCMS_ROOT = None
|
||||||
|
|
||||||
def _pkg_config(name):
|
def _pkg_config(name):
|
||||||
try:
|
try:
|
||||||
command = [
|
command_libs = [
|
||||||
'pkg-config',
|
'pkg-config',
|
||||||
'--libs-only-L', name,
|
'--libs-only-L', name,
|
||||||
|
]
|
||||||
|
command_cflags = [
|
||||||
|
'pkg-config',
|
||||||
'--cflags-only-I', name,
|
'--cflags-only-I', name,
|
||||||
]
|
]
|
||||||
if not DEBUG:
|
if not DEBUG:
|
||||||
command.append('--silence-errors')
|
command_libs.append('--silence-errors')
|
||||||
libs = subprocess.check_output(command).decode('utf8').split(' ')
|
command_cflags.append('--silence-errors')
|
||||||
return libs[1][2:].strip(), libs[0][2:].strip()
|
libs = subprocess.check_output(command_libs).decode('utf8').strip().replace('-L', '')
|
||||||
|
cflags = subprocess.check_output(command_cflags).decode('utf8').strip().replace('-I', '')
|
||||||
|
return (libs, cflags)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user