[yocto] How to add a module to python-native
Ulf Samuelsson
yocto at emagii.com
Mon Mar 26 13:01:07 PDT 2018
Need some advice on how to extend python-native with a python-2.7 module.
I am planning to upload the result of cve-check to our JIRA server.
I wrote a python application which reads the CVE manifest,
downloads the contents of a JIRA project and if a CVE issue
is not present in the database, it will create new issues.
The python application is using the python-restkit module, which has all
the functionality I need, so I can call <script> -f <manifest>
and the JIRA will be updated.
Would like to integrate this with bitbake using a bbclass.
The class will be inherited in local.conf, and will check
if the recipe is an image, and if so, it will call a task
which executes right after the manifest is created and calls
the python script.
do_cve_update_jira () {
<call python scripts>
}
python-native does not build python-restkit, so I have
created a recipe python-restkit which bbextends native.
do_cve_update_jira[depends] = "python-restkit-native"
This seems to ensure that the python-restkit is built and
in the x86 sysroot I have /usr/lib/python-2.7/sitepackages/restkit.
Still, when the python script is called, "import restkit" fails.
Would like to understand how to make sure that python-restkit-native
is always available to a recipe.
I guess, I could make each image somehow depend on python-restkit
native, but it would be better if it was always available to a recipe.
Would appreciate some advice here.
python-restkit is unfortunately only available for python2, not for
python3. Any advice on a good replacement?
Best Regards.
Ulf Samuelsson
More information about the yocto
mailing list