A (python based) code generation tool for Apache Celix projects and bundles.
##Installation
###Option 1 (install with distutils)
pip install pyyaml
python setup.py install
in the celix-bootstrap directory###Option 2 (configure with alias)
pip install pyyaml
alias celix-bootstrap='PYTHONPATH=${cog_dir}:${celix-boostrap_dir} python -m celix.bootstrap'
#Concept The idea behind celix-boostrap is to enable users of Apache Celix to very fast setup of Apache Celix bundle projects. And after that to be able to generate and update the initial bundle code based on some declaritive attributes.
celix-boostrap is build on top of Cog. “Cog is a file generation tool. It lets you use pieces of Python code as generators in your source files to generate whatever text you need.”
The code generation code is added in the comments of the source code (in this case C or CMake syntax). This enables a source files which contains manual code and generated code to coexists and to able to rerun code generation after manual editing source files.
Is good to known that you should not edit anything between the following comments.
{{ {{end}}
#Usage
You can setup a new Apache Celix project by executing following steps:
celix-bootstrap create_project .
celix-bootstrap update .
to generate the needed filescelix-bootstrap update .
again to update the generated filescelix-bootstrap update . -e
to update the project source files one more time and remove the code generation partsYou can create a new bundle by executing the following steps:
celix-bootstrap create_bundle mybundle
mybundle/bundle.yaml
file to declare which components you like to create and what services those components depends on and/or providecelix-bootstrap update mybundle
to generate the neccesary filescelix-bootstrap update .
to include the new bundle into the CMakeLists.txtcelix-bootstrap update . -e
to update the bundle source files one more time and remove the code generation partsYou can build your whole project with the following step:
celix-bootstrap build buildDirectory
to build and the deploy the code within the buildDirectoryAdditional Info