locan.dependencies#

Module to deal with required and optional dependencies.

Optional dependencies are defined in pyproject.toml.

In any module that requires an optional dependency the import should be conditioned:

if HAS_DEPENDENCY[“package”]: import package

Any function that makes use of the optional dependency should be decorated with

@needs_package(“package”)

CONSTANTS

INSTALL_REQUIRES

List of required dependencies (PyPi package names)

EXTRAS_REQUIRE

List of optional dependencies (PyPi package names)

IMPORT_NAMES

A dictionary mapping PyPi package names to import names if they are different

HAS_DEPENDENCY

A dictionary indicating if dependency is available.

Classes

QtBindings(value[, names, module, qualname, ...])

Python bindings to interact with Qt.

Functions

needs_package(package[, import_names, ...])

Function that returns a decorator to check for optional dependency.