aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools')
-rw-r--r--meta-python/recipes-devtools/pyo3/pyo3.inc7
-rw-r--r--meta-python/recipes-devtools/pyo3/pyo3/0001-pyo3-build-config-search-python-sysconfigdata.patch28
-rw-r--r--meta-python/recipes-devtools/pyo3/pyo3_0.14.5.bb150
3 files changed, 185 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/pyo3/pyo3.inc b/meta-python/recipes-devtools/pyo3/pyo3.inc
new file mode 100644
index 0000000000..56879b4a87
--- /dev/null
+++ b/meta-python/recipes-devtools/pyo3/pyo3.inc
@@ -0,0 +1,7 @@
+
+export PYO3_CROSS="1"
+export PYO3_CROSS_PYTHON_VERSION="${PYTHON_BASEVERSION}"
+export PYO3_CROSS_LIB_DIR="${STAGING_LIBDIR}"
+export CARGO_BUILD_TARGET="${HOST_SYS}"
+export RUSTFLAGS
+export PYO3_PYTHON="${PYTHON}"
diff --git a/meta-python/recipes-devtools/pyo3/pyo3/0001-pyo3-build-config-search-python-sysconfigdata.patch b/meta-python/recipes-devtools/pyo3/pyo3/0001-pyo3-build-config-search-python-sysconfigdata.patch
new file mode 100644
index 0000000000..696b91dae6
--- /dev/null
+++ b/meta-python/recipes-devtools/pyo3/pyo3/0001-pyo3-build-config-search-python-sysconfigdata.patch
@@ -0,0 +1,28 @@
+From 937322e1ca64025976d33d446e9646f1885c40f5 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@intel.com>
+Date: Mon, 1 Nov 2021 21:44:06 +0000
+Subject: [PATCH] pyo3-build-config: search python-sysconfigdata
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
+---
+ pyo3-build-config/src/impl_.rs | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs
+index 4690b6e70..9300288ad 100644
+--- a/pyo3-build-config/src/impl_.rs
++++ b/pyo3-build-config/src/impl_.rs
+@@ -919,6 +919,8 @@ fn search_lib_dir(path: impl AsRef<Path>, cross: &CrossCompileConfig) -> Vec<Pat
+ let file_name = file_name.to_string_lossy();
+ if file_name.starts_with("build") {
+ search_lib_dir(f.path(), cross)
++ } else if file_name.starts_with("python-sysconfigdata") {
++ search_lib_dir(f.path(), cross)
+ } else if file_name.starts_with("lib.") {
+ // check if right target os
+ if !file_name.contains(if cross.os == "android" {
+--
+2.30.2
+
diff --git a/meta-python/recipes-devtools/pyo3/pyo3_0.14.5.bb b/meta-python/recipes-devtools/pyo3/pyo3_0.14.5.bb
new file mode 100644
index 0000000000..3a745e093a
--- /dev/null
+++ b/meta-python/recipes-devtools/pyo3/pyo3_0.14.5.bb
@@ -0,0 +1,150 @@
+# Auto-Generated by cargo-bitbake 0.3.15
+#
+inherit cargo distutils3-base
+
+# If this is git based prefer versioned ones if they exist
+# DEFAULT_PREFERENCE = "-1"
+
+# how to get pyo3 could be as easy as but default to a git checkout:
+# SRC_URI += "crate://crates.io/pyo3/0.14.5"
+SRC_URI += "git://github.com/pyo3/pyo3;protocol=https;nobranch=1;branch=main"
+SRCREV = "0f92f28ffd0f57bed1d8e8af2543e8f0b3a02a2f"
+S = "${WORKDIR}/git"
+CARGO_SRC_DIR = ""
+PV:append = ".AUTOINC+0f92f28ffd"
+
+# please note if you have entries that do not begin with crate://
+# you must change them to how that package can be fetched
+SRC_URI += " \
+ crate://crates.io/ahash/0.7.6 \
+ crate://crates.io/anyhow/1.0.44 \
+ crate://crates.io/assert_approx_eq/1.1.0 \
+ crate://crates.io/atty/0.2.14 \
+ crate://crates.io/autocfg/1.0.1 \
+ crate://crates.io/bitflags/1.2.1 \
+ crate://crates.io/bstr/0.2.17 \
+ crate://crates.io/bumpalo/3.8.0 \
+ crate://crates.io/byteorder/1.4.3 \
+ crate://crates.io/cast/0.2.7 \
+ crate://crates.io/cfg-if/1.0.0 \
+ crate://crates.io/clap/2.33.3 \
+ crate://crates.io/criterion-plot/0.4.4 \
+ crate://crates.io/criterion/0.3.4 \
+ crate://crates.io/crossbeam-channel/0.5.1 \
+ crate://crates.io/crossbeam-deque/0.8.1 \
+ crate://crates.io/crossbeam-epoch/0.9.5 \
+ crate://crates.io/crossbeam-utils/0.8.5 \
+ crate://crates.io/csv-core/0.1.10 \
+ crate://crates.io/csv/1.1.6 \
+ crate://crates.io/ctor/0.1.21 \
+ crate://crates.io/either/1.6.1 \
+ crate://crates.io/eyre/0.6.5 \
+ crate://crates.io/getrandom/0.1.16 \
+ crate://crates.io/getrandom/0.2.3 \
+ crate://crates.io/ghost/0.1.2 \
+ crate://crates.io/glob/0.3.0 \
+ crate://crates.io/half/1.7.1 \
+ crate://crates.io/hashbrown/0.11.2 \
+ crate://crates.io/hermit-abi/0.1.19 \
+ crate://crates.io/indenter/0.3.3 \
+ crate://crates.io/indexmap/1.7.0 \
+ crate://crates.io/indoc-impl/0.3.6 \
+ crate://crates.io/indoc/0.3.6 \
+ crate://crates.io/instant/0.1.12 \
+ crate://crates.io/inventory-impl/0.1.10 \
+ crate://crates.io/inventory/0.1.10 \
+ crate://crates.io/itertools/0.10.1 \
+ crate://crates.io/itoa/0.4.8 \
+ crate://crates.io/js-sys/0.3.55 \
+ crate://crates.io/lazy_static/1.4.0 \
+ crate://crates.io/libc/0.2.106 \
+ crate://crates.io/lock_api/0.4.5 \
+ crate://crates.io/log/0.4.14 \
+ crate://crates.io/memchr/2.4.1 \
+ crate://crates.io/memoffset/0.6.4 \
+ crate://crates.io/num-bigint/0.4.2 \
+ crate://crates.io/num-complex/0.4.0 \
+ crate://crates.io/num-integer/0.1.44 \
+ crate://crates.io/num-traits/0.2.14 \
+ crate://crates.io/num_cpus/1.13.0 \
+ crate://crates.io/once_cell/1.8.0 \
+ crate://crates.io/oorandom/11.1.3 \
+ crate://crates.io/parking_lot/0.11.2 \
+ crate://crates.io/parking_lot_core/0.8.5 \
+ crate://crates.io/paste-impl/0.1.18 \
+ crate://crates.io/paste/0.1.18 \
+ crate://crates.io/plotters-backend/0.3.2 \
+ crate://crates.io/plotters-svg/0.3.1 \
+ crate://crates.io/plotters/0.3.1 \
+ crate://crates.io/ppv-lite86/0.2.15 \
+ crate://crates.io/proc-macro-hack/0.5.19 \
+ crate://crates.io/proc-macro2/1.0.32 \
+ crate://crates.io/proptest/0.10.1 \
+ crate://crates.io/quick-error/1.2.3 \
+ crate://crates.io/quote/1.0.10 \
+ crate://crates.io/rand/0.7.3 \
+ crate://crates.io/rand_chacha/0.2.2 \
+ crate://crates.io/rand_core/0.5.1 \
+ crate://crates.io/rand_hc/0.2.0 \
+ crate://crates.io/rand_xorshift/0.2.0 \
+ crate://crates.io/rayon-core/1.9.1 \
+ crate://crates.io/rayon/1.5.1 \
+ crate://crates.io/redox_syscall/0.2.10 \
+ crate://crates.io/regex-automata/0.1.10 \
+ crate://crates.io/regex-syntax/0.6.25 \
+ crate://crates.io/regex/1.5.4 \
+ crate://crates.io/rustc_version/0.4.0 \
+ crate://crates.io/rustversion/1.0.5 \
+ crate://crates.io/ryu/1.0.5 \
+ crate://crates.io/same-file/1.0.6 \
+ crate://crates.io/scopeguard/1.1.0 \
+ crate://crates.io/semver/1.0.4 \
+ crate://crates.io/serde/1.0.130 \
+ crate://crates.io/serde_cbor/0.11.2 \
+ crate://crates.io/serde_derive/1.0.130 \
+ crate://crates.io/serde_json/1.0.68 \
+ crate://crates.io/smallvec/1.7.0 \
+ crate://crates.io/syn/1.0.81 \
+ crate://crates.io/termcolor/1.1.2 \
+ crate://crates.io/textwrap/0.11.0 \
+ crate://crates.io/tinytemplate/1.2.1 \
+ crate://crates.io/toml/0.5.8 \
+ crate://crates.io/trybuild/1.0.52 \
+ crate://crates.io/unicode-width/0.1.9 \
+ crate://crates.io/unicode-xid/0.2.2 \
+ crate://crates.io/unindent/0.1.7 \
+ crate://crates.io/version_check/0.9.3 \
+ crate://crates.io/walkdir/2.3.2 \
+ crate://crates.io/wasi/0.10.2+wasi-snapshot-preview1 \
+ crate://crates.io/wasi/0.9.0+wasi-snapshot-preview1 \
+ crate://crates.io/wasm-bindgen-backend/0.2.78 \
+ crate://crates.io/wasm-bindgen-macro-support/0.2.78 \
+ crate://crates.io/wasm-bindgen-macro/0.2.78 \
+ crate://crates.io/wasm-bindgen-shared/0.2.78 \
+ crate://crates.io/wasm-bindgen/0.2.78 \
+ crate://crates.io/web-sys/0.3.55 \
+ crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+ crate://crates.io/winapi-util/0.1.5 \
+ crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+ crate://crates.io/winapi/0.3.9 \
+ file://0001-pyo3-build-config-search-python-sysconfigdata.patch \
+"
+
+
+
+# FIXME: update generateme with the real MD5 of the license file
+LIC_FILES_CHKSUM = " \
+ file://LICENSE;md5=6f7a514acfc6d224bc1a2f47a537a552 \
+"
+
+SUMMARY = "Bindings to Python interpreter"
+HOMEPAGE = "https://github.com/pyo3/pyo3"
+LICENSE = "Apache-2.0"
+
+# includes this file if it exists but does not fail
+# this is useful for anything you may want to override from
+# what cargo-bitbake generates.
+include pyo3-${PV}.inc
+include pyo3.inc
+
+BBCLASSEXTEND = "native"