build: make the doc generator find the right libnm.so

At some point gobject-introspection added an API to add a library path
and stopped honoring the LD_LIBRARY_PATH (a bug, according to GI
documentation?).
This commit is contained in:
Lubomir Rintel 2017-01-18 19:55:17 +01:00
parent a18eed123b
commit 6c96aafaa9

View file

@ -18,12 +18,24 @@
from __future__ import print_function
import os
import gi
gi.require_version('NM', '1.0')
from gi.repository import NM, GObject
gi.require_version('GIRepository', '2.0')
from gi.repository import GIRepository
import argparse, datetime, re, sys
import xml.etree.ElementTree as ET
try:
libs = os.environ['LD_LIBRARY_PATH'].split(':')
libs.reverse()
for lib in libs:
GIRepository.Repository.prepend_library_path(lib)
except KeyError:
pass
gi.require_version('NM', '1.0')
from gi.repository import NM, GObject
dbus_type_name_map = {
'b': 'boolean',
's': 'string',