aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <tim.orling@konsulko.com>2022-01-14 20:46:01 -0800
committerTim Orling <tim.orling@konsulko.com>2022-01-15 10:42:16 -0800
commit3c8741c61aed778d2e909d46eb71a96b0dea1bcf (patch)
tree8c53d8f527a1b71dc74e56c78444930dbf021622
parent110a1da7ed82cc6780a8a387931e7eeb722b2cd5 (diff)
downloadmeta-openembedded-contrib-3c8741c61aed778d2e909d46eb71a96b0dea1bcf.tar.gz
setuptools3_rust.bbclass: setuptoools Rust plugin
setuptools-rust is a plugin for setuptools to build Rust Python extensions implemented with PyO3 or rust-cpython. Compile and distribute Python extensions written in Rust as easily as if they were written in C. This class inherits pyo3.bbclass (and therefore cargo.bbclass) and setuptools3.bbclass to make it easier to build Python modules with Rust extensions. It is strongly recommended to provide crates needed for your recipe using the crate:// fetcher. This can be helped with the cargo-bitbake command [1]. [1] https://crates.io/crates/cargo-bitbake Signed-off-by: Tim Orling <tim.orling@konsulko.com>
-rw-r--r--meta-python/classes/setuptools3_rust.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta-python/classes/setuptools3_rust.bbclass b/meta-python/classes/setuptools3_rust.bbclass
new file mode 100644
index 0000000000..fb11f08f89
--- /dev/null
+++ b/meta-python/classes/setuptools3_rust.bbclass
@@ -0,0 +1,11 @@
+inherit pyo3 setuptools3
+
+DEPENDS += "python3-setuptools-rust-native"
+
+setuptools3_rust_do_configure() {
+ pyo3_do_configure
+ cargo_common_do_configure
+ setuptools3_do_configure
+}
+
+EXPORT_FUNCTIONS do_configure