From 2a25947740669d03c2fe40b7d6fde0415032bb9d Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Mon, 1 Nov 2021 22:07:50 +0000 Subject: [WIP] pyo3: add recipe for 0.14.5 Use cargo-bitbake to create recipe and then attempt to patch to get it to find _sysconfigdata_*.py Currently fails in: https://github.com/PyO3/pyo3/blob/v0.14.5/pyo3-build-config/src/impl_.rs#L855 Signed-off-by: Tim Orling --- meta-python/recipes-devtools/pyo3/pyo3.inc | 7 + ...-build-config-search-python-sysconfigdata.patch | 28 ++++ meta-python/recipes-devtools/pyo3/pyo3_0.14.5.bb | 150 +++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 meta-python/recipes-devtools/pyo3/pyo3.inc create mode 100644 meta-python/recipes-devtools/pyo3/pyo3/0001-pyo3-build-config-search-python-sysconfigdata.patch create mode 100644 meta-python/recipes-devtools/pyo3/pyo3_0.14.5.bb 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 +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 +--- + 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, cross: &CrossCompileConfig) -> Vec