mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
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:
parent
a18eed123b
commit
6c96aafaa9
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue