Module refinery.lib.shared
Shared dependencies. Each shared dependency is stored in a submodule.
Expand source code Browse git
"""
Shared dependencies. Each shared dependency is stored in a submodule.
"""
from __future__ import annotations
from typing import Callable, Collection
from refinery.lib.dependencies import LazyDependency, Mod
from refinery.units import Unit
class GlobalDependenciesDummy(Unit, abstract=True):
"""
The sole purpose of this unit is to collect shared dependencies.
"""
def dependency(name: str, dist: Collection[str] = (), more: str | None = None):
"""
This decorator is used to install a shared dependency.
"""
def decorator(imp: Callable[[], Mod]):
dep = LazyDependency(imp, name, dist, more)
dep.register(GlobalDependenciesDummy)
return dep()
return decorator
Sub-modules
refinery.lib.shared.capstonerefinery.lib.shared.decompyle3refinery.lib.shared.iciclerefinery.lib.shared.orjsonrefinery.lib.shared.pefilerefinery.lib.shared.pyppmdrefinery.lib.shared.pyzstdrefinery.lib.shared.smdarefinery.lib.shared.speakeasyrefinery.lib.shared.uncompyle6refinery.lib.shared.unicornrefinery.lib.shared.xdis
Functions
-
This decorator is used to install a shared dependency.
Expand source code Browse git
def dependency(name: str, dist: Collection[str] = (), more: str | None = None): """ This decorator is used to install a shared dependency. """ def decorator(imp: Callable[[], Mod]): dep = LazyDependency(imp, name, dist, more) dep.register(GlobalDependenciesDummy) return dep() return decorator