]> code.ossystems Code Review - openembedded-core.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>
Tue, 15 Mar 2022 08:40:11 +0000 (08:40 +0000)
commit545127cb3a7d810f1bae8f8610910302abdeadaa
tree2a0e2e1aa315176ae3667daba9aaef7b5f7c0d10
parentb08993bd0d719523b48a5588df5faf4307b11306
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]