meta-iota — IOTA Ecosystem Development Fund —Final Report
The full article was originally published by Bernardo Rodrigues on Medium. Read the full article here.
You can read the first Milestone Report to find out what has been done previously. An introduction to the project is also available on my first post: IOTA cIRI on a BeagleBone Black with Yocto Project and OpenEmbedded. There, I explain what the Yocto Project and OpenEmbedded are, and explain a bit the context behind the idea of creating the meta-iota OpenEmbedded layer.
In a nutshell, my goal is to allow the integration of IOTA projects into Yocto-based Embedded Linux Distributions.
For the second milestone, I wanted to achieve the following goals:
- iota.py BitBake recipe + usage example
- iota.go recipe BitBake recipe + usage example
- Hornet BitBake recipe
- honeycombOS Distro configs + image
This article is meant to serve as a report of Milestone 2 of the development of meta-iota. I will describe in detail what was done for the integration of each of the four projects listed above, as well as challenges and opportunities faced during this period.
Also known as PyOTA, iota.py is is the official Python library for the IOTA Core. It implements both the official API, as well as newly-proposed functionality (such as signing, bundles, utilities and conversion).
PyOTA is compatible with Python 3.7, 3.6, 3.5 and 2.7.
In terms of integration into meta-iota, the biggest challenge for this library was the fact that many Python dependencies were not provided by the standard OpenEmbedded or Poky distributions. As a workaround, I had to write a few extra recipes, namely:
I also borrowed a few recipes from meta-jupyter. This is not the cleanest approach. However, since we don’t do anything related to Jupyter notebooks or IPython, this is better than setting a layer dependency. I made sure to mention the original layer on all recipe headers.
All these extra recipes can be found at meta-iota/meta-tangle/recipes-python/.
Although PyOTA does support Python 2.7, the Python community has officially declared Discontinuation of 2.7 from 01/01/2020. So I decided to only support PyOTA for Python 3 on meta-iota.
The recipe for PyOTA is meta-iota/meta-tangle/recipes-iota/iota.py/python3-pyota_2.1.0.bb. Its behavior is relatively simple, only inheriting pypi + setuptools and setting runtime dependencies for other required Python Packages.
Since a library doesn’t really do anything by itself, I made sure to include a recipe with usage examples based on the python-iota-workshop repository. You can find the recipe at meta-iota/meta-tangle/recipes-iota/iota.py/python-iota-workshop_git.bb. Its behavior is also pretty simple, the most crucial part being the declaration of the appropriate Python Packages as runtime dependencies, namely python3-pyota, python3-zmq, and python3-core.
It’s important to note that PyOTA’s C extension and Local PoW features are currently not enabled in the recipe.
This is the official Go client library, which allows you to do the following: