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?).
(cherry picked from commit 6c96aafaa9
)
This commit is contained in:

committed by
Thomas Haller

parent
ec805a6ce6
commit
2ee8462774
@@ -18,12 +18,24 @@
|
|||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import os
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('NM', '1.0')
|
gi.require_version('GIRepository', '2.0')
|
||||||
from gi.repository import NM, GObject
|
from gi.repository import GIRepository
|
||||||
import argparse, datetime, re, sys
|
import argparse, datetime, re, sys
|
||||||
import xml.etree.ElementTree as ET
|
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 = {
|
dbus_type_name_map = {
|
||||||
'b': 'boolean',
|
'b': 'boolean',
|
||||||
's': 'string',
|
's': 'string',
|
||||||
|
Reference in New Issue
Block a user