mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Nicer error when pkg-config fails
This commit is contained in:
parent
73ce2ccb47
commit
3b0d8ec500
1 changed files with 10 additions and 7 deletions
17
setup.py
17
setup.py
|
|
@ -40,15 +40,18 @@ PKGCONFIG = os.environ.get('PKGCONFIG_EXE', 'pkg-config')
|
|||
|
||||
|
||||
def pkg_config(pkg, *args):
|
||||
return list(
|
||||
filter(
|
||||
None,
|
||||
shlex.split(
|
||||
subprocess.check_output([PKGCONFIG, pkg] + list(args))
|
||||
.decode('utf-8')
|
||||
try:
|
||||
return list(
|
||||
filter(
|
||||
None,
|
||||
shlex.split(
|
||||
subprocess.check_output([PKGCONFIG, pkg] + list(args))
|
||||
.decode('utf-8')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
raise SystemExit('The package {} was not found on your system'.format(pkg))
|
||||
|
||||
|
||||
def at_least_version(package, major, minor=0):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue