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"""
@@ -1696,6 +1696,7 @@ class type_declaration(declaration):
class uninitialized_tag: ...
def arrange_polygons(polygons): ...
def clear_plugin_search_paths() -> None: ...
def clear_schemas(): ...
def construct_iterator(geometry_library, settings, file, num_threads): ...
def construct_iterator_with_include_exclude(geometry_library, settings, file, elems, include, num_threads): ...
@@ -1707,6 +1708,7 @@ def create_epeck(*args): ...
def create_shape(*args): ...
def flatten(deep): ...
def get_feature(x): ...
def get_plugin_search_paths() -> tuple[str, ...]: ...
def get_info_cpp(v, include_identifier=True): ...
def get_log(): ...
def guess_file_type(fn): ...
@@ -1726,6 +1728,7 @@ def schema_by_name(arg1: str) -> schema_definition: ...
def schema_names() -> tuple[str, ...]: ...
def serialise(schema_name, shape_str, advanced=True): ...
def set_feature(x, v): ...
def set_plugin_search_paths(paths) -> None: ...
def set_log_format_json(): ...
def set_log_format_text(): ...
def stream_from_string(data): ...