merge: branch 'wip/jtojnar/pygobject-3.52-docs'
meson: Fix docs generation with PyGObject 3.52 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2164
This commit is contained in:
@@ -209,7 +209,6 @@ if enable_introspection
|
||||
'LD_LIBRARY_PATH=' + ld_library_path,
|
||||
python_path,
|
||||
gen_gir_cmd,
|
||||
'--lib-path', meson.current_build_dir(),
|
||||
'--gir', libnm_gir[0],
|
||||
'--output', '@OUTPUT@',
|
||||
'--target', name
|
||||
|
@@ -6,26 +6,9 @@
|
||||
from __future__ import print_function, unicode_literals
|
||||
import xml.etree.ElementTree as ET
|
||||
import argparse
|
||||
import os
|
||||
import gi
|
||||
import re
|
||||
|
||||
gi.require_version("GIRepository", "2.0")
|
||||
from gi.repository import GIRepository
|
||||
|
||||
try:
|
||||
libs = os.environ["LD_LIBRARY_PATH"].split(":")
|
||||
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
|
||||
|
||||
gi.require_version("NM", "1.0")
|
||||
from gi.repository import NM, GObject
|
||||
|
||||
@@ -354,13 +337,6 @@ def main(gir_path_str, output_path_str, output_target):
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"-l",
|
||||
"--lib-path",
|
||||
metavar="PATH",
|
||||
action="append",
|
||||
help="path to scan for shared libraries",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-g",
|
||||
"--gir",
|
||||
@@ -384,8 +360,4 @@ if __name__ == "__main__":
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.lib_path:
|
||||
for lib in args.lib_path:
|
||||
GIRepository.Repository.prepend_library_path(lib)
|
||||
|
||||
main(args.gir, args.output, args.target)
|
||||
|
Reference in New Issue
Block a user