Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -21,11 +21,11 @@ def add_packages(packages, ext=None, **kw): · 20 unmodified lines | ||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | for package in packages: |
| 24 | + cmd = ['pkg-config', '--libs', '--cflags', package] | |
| 24 | 25 | try: |
| 25 | − cmd = ['pkg-config', '--libs', '--cflags', package] | |
| 26 | 26 | tokens = subprocess.check_output(cmd) |
| 27 | − except subprocess.CalledProcessError: | |
| 28 | − print("{:s} could not be found".format(package)) | |
| 27 | + except Exception as e: | |
| 28 | + print("Running \"{:s}\" failed: {:s}".format(' '.join(cmd), repr(e))) | |
| 29 | 29 | continue |
| 30 | 30 | tokens = tokens.decode('utf8').split() |
| 31 | 31 | for token in tokens: |