summaryrefslogtreecommitdiffstats
path: root/meta-python/classes/pyo3.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* meta-python: Clean up recipes and classes that were moved to oe-coreAlejandro Enedino Hernandez Samaniego2022-03-161-30/+0
| | | | | | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro.hernandez@linux.microsoft.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: tgamblin <trevor.gamblin@windriver.com>
* pyo3.bbclass: add class for PyO3 cross-compilationTim Orling2022-01-181-0/+30
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> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>