Re: Why python3 is build native in yocto ??? #python


Ross Burton
 

On Fri, 6 Nov 2020 at 08:23, <william.jacob@sama.com.sg> wrote:
I am trying to compile python package for yocto and I found python3 (python3.7) is build native then it cross compiled.I want to know why it is done like this in python.
The python3 build for target doesn't directly depend on python3-native.

Some recipes do depend on python3-native (although by definition there
is a python3 on your host) as they need to run non-standard Python
modules as part of their build. We don't want to assume that you've
installed all of these modules (as the list is ever growing) and we
don't want to assume that you've installed python3-dev on the host (as
we want to have minimal build requirements, and C modules are not
portable between Python versions).

Basically I want python3 binary cross compiled for arm architecture should be available in recipe-sysroot and recipe-sysroot-native directory . Right now it is available only in recipe-sysroot-native.
Please explain what you are actually trying to do. For 99% of python
modules, simply inheriting setuptool3 or even better pypi is
sufficient. If a package has hand-coded Python detection then it gets
a lot more complicated as Python doesn't have great support for
cross-compiling, and most people writing the build scripts don't
consider it at all.

Ross

Join yocto@lists.yoctoproject.org to automatically receive all group messages.