5e3ca820b3
This change moves all plugin handling code into the kas.plugins module. New accessor functions `plugins.get(name)` and `plugins.all()` are provided to wrap the plugins dictionary so that the kas main function doesn't need to worry about how this is accessed. Plugins are loaded at runtime rather than at parse time by calling `plugins.load()` which gives us an improved ability to handle errors. The `@kasplugin` decorator is removed as it modified and attribute on the kasplugin function itself when a plugin module was loaded. Importing a module should not result in changes to a variable in a different module as it leads to an initialization code flow which is difficult to reason about. Instead, plugin modules should now list the plugins which they introduce in a `__KAS_PLUGINS__` list which will be walked at runtime by `plugins.load()`. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> |
||
---|---|---|
.github/workflows | ||
docs | ||
kas | ||
scripts | ||
tests | ||
.dockerignore | ||
.flake8 | ||
.gitignore | ||
CHANGELOG.md | ||
container-entrypoint | ||
CONTRIBUTING.md | ||
Dockerfile | ||
Dockerfile.isar | ||
kas-container | ||
kas-docker | ||
LICENSE | ||
README.rst | ||
requirements_rtd.txt | ||
run-kas | ||
setup.py |
Setup tool for bitbake based projects ===================================== +--------------------+ | Build Status | +====================+ | |workflow-master|_ | +--------------------+ | |workflow-next|_ | +--------------------+ .. |workflow-master| image:: https://github.com/siemens/kas/workflows/master/badge.svg .. _workflow-master: https://github.com/siemens/kas/actions?query=workflow%3Amaster .. |workflow-next| image:: https://github.com/siemens/kas/workflows/next/badge.svg .. _workflow-next: https://github.com/siemens/kas/actions?query=workflow%3Anext This tool provides an easy mechanism to setup bitbake based projects. The OpenEmbedded tooling support starts at step 2 with bitbake. The downloading of sources and then configuration has to be done by hand. Usually, this is explained in a README. Instead kas is using a project configuration file and does the download and configuration phase. Key features provided by the build tool: - clone and checkout bitbake layers - create default bitbake settings (machine, arch, ...) - launch minimal build environment, reducing risk of host contamination - initiate bitbake build process See the `kas documentation <https://kas.readthedocs.io>`_ for further details.