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 | for package in packages: | 23 | for package in packages: |
| 24 | cmd = ['pkg-config', '--libs', '--cflags', package] | ||
| 24 | try: | 25 | try: |
| 25 | cmd = ['pkg-config', '--libs', '--cflags', package] | ||
| 26 | tokens = subprocess.check_output(cmd) | 26 | tokens = subprocess.check_output(cmd) |
| 27 | except subprocess.CalledProcessError: | 27 | except Exception as e: |
| 28 | print("{:s} could not be found".format(package)) | 28 | print("Running \"{:s}\" failed: {:s}".format(' '.join(cmd), repr(e))) |
| 29 | continue | 29 | continue |
| 30 | tokens = tokens.decode('utf8').split() | 30 | tokens = tokens.decode('utf8').split() |
| 31 | for token in tokens: | 31 | for token in tokens: |