cant get the python interpreter installed in recipe-sysroot
I'm trying to run some unit tests on some of our internal packages using ctest which in turn executes some doctest based binaries, these in turn try to start a python based fixture. So part of the problem is ctest executes natively and then tries to exec cross compiled binaries. This is relatively easy to resolve with qemu-user and the relevant bin_fmt strings. With this all the C only tests are passing. However when it comes to fire up the python interpreter it by default tries to run my hosts interpreter. It's pretty trivial to adapt the test suite to detect its within yocto and run the python pointed to by PYTHON, however this is still problematic, some of the modules such as zmq are trying to use c based libraries. I think i need to run a python with qemu within the recipe-sysroot however I cannot figure out how to get the python interpreter installed here. With *DEPENDS += "python3"* it is still missing. I have seen some of the docs re running tests within the final built image however I would like to be able to run the tests on specific recipes without having to build the entire image first hence I have added a class that implements a *run_test* task such that it can be used like *bitbake -c run_test <recipe>*. How can I "install" python3 within the recipe-sysroot ?
Quoted 10 lines · Daniel Squires
I'm trying to run some unit tests on some of our internal packages using ctest which in turn executes some doctest based binaries, these in turn try to start a python based fixture. So part of the problem is ctest executes natively and then tries to exec cross compiled binaries. This is relatively easy to resolve with qemu-user and the relevant
bin_fmtstrings. With this all the C only tests are passing. However when it comes to fire up the python interpreter it by default tries to run my hosts interpreter. It's pretty trivial to adapt the test suite to detect its within yocto and run the python pointed to by PYTHON, however this is still problematic, some of the modules such as zmq are trying to use c based libraries. I think i need to run a python with qemu
Quoted 8 lines
within the recipe-sysroot however I cannot figure out how to get the python interpreter installed here.
With DEPENDS += "python3" it is still missing. I have seen some of the docs re running tests within the final built image however I would like to be able to run the tests on specific recipes without having to build the entire image first hence I have added a class that implements arun_testtask such that it can be used like bitbake -crun_test<recipe>.
How can I "install" python3 within the recipe-sysroot ?
We don't store that anywhere. The sysroot data is stored and handled separately from the target package data since it isn't always identical. One of the optimisations in the code is that since we don't run the target binaries, they aren't part of the sysroot. The python target binaries will therefore never end up in the sysroot.
Cheers,
Richard