]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
pyo3.bbclass: move from meta-python
authorTim Orling <tim.orling@konsulko.com>
Sat, 12 Mar 2022 20:49:24 +0000 (12:49 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Mar 2022 08:44:45 +0000 (08:44 +0000)
commitf3130197ed93fd60b4cad326940b02a5554ed089
tree5a0e992fca95b003eeb7a41058f4043885f6c59f
parentbaa9f9c3c3bea1f81e02bb047171ca78f714b034
pyo3.bbclass: move from meta-python

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 <tim.orling@konsulko.com>
meta/classes/pyo3.bbclass [new file with mode: 0644]