mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 15:14:45 +03:00
Capture pkg-config output even if only one component returned
Changing pkg-config output parser in case it returns only one component (only -I or only -L)
This commit is contained in:
parent
4407cb6507
commit
9cdfac4454
4
setup.py
4
setup.py
|
@ -154,8 +154,8 @@ def _pkg_config(name):
|
||||||
]
|
]
|
||||||
if not DEBUG:
|
if not DEBUG:
|
||||||
command.append('--silence-errors')
|
command.append('--silence-errors')
|
||||||
libs = subprocess.check_output(command).decode('utf8').split(' ')
|
libs = subprocess.check_output(command).decode('utf8')
|
||||||
return libs[1][2:].strip(), libs[0][2:].strip()
|
return re.match(r'(?:-L([^\s]+))?\s*(?:-I([^\s]+))?', libs).groups()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user