mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add --typelib-path command line argument
Allows adding directories to search for typelib files.
This commit is contained in:
parent
90001bd885
commit
8c3c43a34a
2 changed files with 18 additions and 1 deletions
|
@ -32,9 +32,15 @@ from . import typelib, xml_reader
|
|||
_namespace_cache: T.Dict[str, "Namespace"] = {}
|
||||
_xml_cache = {}
|
||||
|
||||
_user_search_paths = []
|
||||
|
||||
|
||||
def add_typelib_search_path(path: str):
|
||||
_user_search_paths.append(path)
|
||||
|
||||
|
||||
def get_namespace(namespace: str, version: str) -> "Namespace":
|
||||
search_paths = GIRepository.Repository.get_search_path()
|
||||
search_paths = [*GIRepository.Repository.get_search_path(), *_user_search_paths]
|
||||
|
||||
filename = f"{namespace}-{version}.typelib"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue