register
- register_modules_factory(modules: Iterable[str]) Tuple[Callable, Callable]
Register addon submodules and handle dependency installation (if dependencies were added via
add_dependencies()
).- Parameters:
deps (list) – List of module file names to register. Each file has to define its own
register()
andunregister()
functions.- Returns:
register()
andunregister()
function
- add_dependencies(deps: dict, path: Path | None = None, no_extra_deps: bool = False)
Add dependencies to be installed via pip during registration.
- Parameters:
deps (dict) – Pairs of pip package and module names (can be the same)
path (pathlib.Path) – Directory to install the dependencies to (defaults to
calling_package_root/site_packages
)no_extra_deps (bool) – Ignore any sub-dependencies required (pip –no-deps option)