build: fix build with older gi

Fixes: 6c96aafaa9
(cherry picked from commit 22722b7732)
(cherry picked from commit b916d9dfe0)
This commit is contained in:
Lubomir Rintel 2017-01-19 11:37:41 +01:00 committed by Thomas Haller
parent bc2e0269a4
commit 263dc2dfd1

View file

@ -30,6 +30,11 @@ try:
libs.reverse()
for lib in libs:
GIRepository.Repository.prepend_library_path(lib)
except AttributeError:
# An old GI version, that has no prepend_library_path
# It's alright, it probably interprets LD_LIBRARY_PATH
# correctly.
pass
except KeyError:
pass