mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Fixes to plug-in loading in and outside of pyodide
This commit is contained in:
@@ -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"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user