Fixes to plug-in loading in and outside of pyodide

This commit is contained in:
Thomas Krijnen
2026-05-07 14:43:26 +02:00
parent 2257d7930a
commit e893552f24
19 changed files with 642 additions and 46 deletions
@@ -101,8 +101,11 @@ __all__ = [
"entity_instance",
"file",
"guid",
"get_plugin_search_paths",
"ifcopenshell_wrapper",
"rocksdb_lazy_instance",
"clear_plugin_search_paths",
"set_plugin_search_paths",
"sqlite",
"sqlite_entity",
"stream",
@@ -116,6 +119,18 @@ except:
pass
def set_plugin_search_paths(paths: Sequence[Union[os.PathLike, str]]) -> None:
ifcopenshell_wrapper.set_plugin_search_paths([os.fspath(path) for path in paths])
def get_plugin_search_paths() -> tuple[str, ...]:
return tuple(ifcopenshell_wrapper.get_plugin_search_paths())
def clear_plugin_search_paths() -> None:
ifcopenshell_wrapper.clear_plugin_search_paths()
class Error(Exception):
"""Error used when a generic problem occurs"""