mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
Merge branch 'alatiera/bump-gi-requirment' into 'main'
Port to libgirepository-2.0 See merge request jwestman/blueprint-compiler!218
This commit is contained in:
commit
719c2ce5c6
2 changed files with 8 additions and 3 deletions
|
@ -24,7 +24,7 @@ from functools import cached_property
|
||||||
|
|
||||||
import gi # type: ignore
|
import gi # type: ignore
|
||||||
|
|
||||||
gi.require_version("GIRepository", "2.0")
|
gi.require_version("GIRepository", "3.0")
|
||||||
from gi.repository import GIRepository # type: ignore
|
from gi.repository import GIRepository # type: ignore
|
||||||
|
|
||||||
from . import typelib, xml_reader
|
from . import typelib, xml_reader
|
||||||
|
@ -42,7 +42,8 @@ def add_typelib_search_path(path: str):
|
||||||
|
|
||||||
|
|
||||||
def get_namespace(namespace: str, version: str) -> "Namespace":
|
def get_namespace(namespace: str, version: str) -> "Namespace":
|
||||||
search_paths = [*GIRepository.Repository.get_search_path(), *_user_search_paths]
|
repo = GIRepository.Repository()
|
||||||
|
search_paths = [*repo.get_search_path(), *_user_search_paths]
|
||||||
|
|
||||||
filename = f"{namespace}-{version}.typelib"
|
filename = f"{namespace}-{version}.typelib"
|
||||||
|
|
||||||
|
@ -73,8 +74,9 @@ def get_available_namespaces() -> T.List[T.Tuple[str, str]]:
|
||||||
if len(_available_namespaces):
|
if len(_available_namespaces):
|
||||||
return _available_namespaces
|
return _available_namespaces
|
||||||
|
|
||||||
|
repo = GIRepository.Repository()
|
||||||
search_paths: list[str] = [
|
search_paths: list[str] = [
|
||||||
*GIRepository.Repository.get_search_path(),
|
*repo.get_search_path(),
|
||||||
*_user_search_paths,
|
*_user_search_paths,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@ datadir = join_paths(prefix, get_option('datadir'))
|
||||||
|
|
||||||
py = import('python').find_installation('python3')
|
py = import('python').find_installation('python3')
|
||||||
|
|
||||||
|
dependency('glib-2.0', version: '>= 2.80.0')
|
||||||
|
dependency('girepository-2.0', version: '>= 2.80.0')
|
||||||
|
|
||||||
subdir('docs')
|
subdir('docs')
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue