python: add details on missing library to error message (#9332)

When a library cannot be found, the exception now includes the name
of the library that was requested.
This commit is contained in:
Denis Davydov 2018-10-04 04:46:14 +02:00 committed by Peter Scheibel
parent 219846684b
commit 600acbbe66

View File

@ -528,7 +528,7 @@ def libs(self):
return LibraryList(os.path.join(frameworkprefix, ldlibrary))
else:
msg = 'Unable to locate {0} libraries in {1}'
raise RuntimeError(msg.format(self.name, libdir))
raise RuntimeError(msg.format(ldlibrary, libdir))
else:
library = self.get_config_var('LIBRARY')
@ -538,7 +538,7 @@ def libs(self):
return LibraryList(os.path.join(frameworkprefix, library))
else:
msg = 'Unable to locate {0} libraries in {1}'
raise RuntimeError(msg.format(self.name, libdir))
raise RuntimeError(msg.format(library, libdir))
@property
def headers(self):