pyo3.bbclass: add class for PyO3 cross-compilation
pyo3.bbclass: add class for PyO3 cross-compilation

PyO3 provides Rust bindings for Python, including tools for creating native
Python extension modules. Running and interacting with Python code from a
Rust binary is also supported.

This class sets up the cross-compilation environment.

Export PYO3_CROSS, PYO3_CROSS_LIB_DIR, PYO3_CROSS_INCLUDE_DIR and CARGO_BUILD_TARGET
to inform tools like setuptools-rust we are cross-compiling.

Export RUSTFLAGS so cargo can find 'std' and 'core' for target

Dynamically generate PyO3 config file and export PYO3_CONFIG_FILE
absolute path. This is the trick that finally made pyo3 work.

Signed-off-by: Tim Orling <4a197974c830d0975e20542d95b169351b8b9ef3@konsulko.com>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
Signed-off-by: Trevor Gamblin <fb8c09b3db10148c84dac072f39fc5dba3573139@windriver.com>

openembedded/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded