mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 01:06:37 +01:00
When bitbaking python3-rpds-py it built extension module as:
site-packages/rpds/rpds.cpython-312-armv7l-linux-gnueabihf.so
Which caused error on target:
root@qemuarm:~# python3 -c "from rpds import HashTrieMap, HashTrieSet, List"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.12/site-packages/rpds/__init__.py", line 1, in <module>
from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'
Where as it should have been:
site-packages/rpds/rpds.cpython-312-arm-linux-gnueabihf.so
Associated upstream bug report:
https://github.com/PyO3/maturin/issues/2203
Associated upstream pull request:
https://github.com/PyO3/maturin/pull/2204
Note - mitigation has not been tested with musl:
https://github.com/PyO3/maturin/pull/2204#issuecomment-2323952320
(From OE-Core rev: 32a8a7379008cc6e367b7664c5b10b29f0bb8136)
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
77 lines
2.8 KiB
Diff
77 lines
2.8 KiB
Diff
From 0c6b8cc84eff72ed21098029aaba079b899dbee2 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Vesa=20J=C3=A4=C3=A4skel=C3=A4inen?=
|
|
<vesa.jaaskelainen@vaisala.com>
|
|
Date: Sun, 1 Sep 2024 09:23:40 +0300
|
|
Subject: [PATCH 2/5] Fix cross compilation issue with linux-armv7l
|
|
architecture
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
When compiling under Yocto project for linux-armv7l target architecture
|
|
.so files were generated incorrectly as:
|
|
|
|
rpds.cpython-312-armv7l-linux-gnueabihf.so
|
|
|
|
Where as platform and EXT_SUFFIX are defined as:
|
|
|
|
>>> sysconfig.get_platform()
|
|
'linux-armv7l'
|
|
>>> sysconfig.get_config_vars()['EXT_SUFFIX']
|
|
'.cpython-312-arm-linux-gnueabihf.so'
|
|
|
|
Which should have caused the .so files as:
|
|
|
|
rpds.cpython-312-arm-linux-gnueabihf.so
|
|
|
|
Upstream-Status: Backport [https://github.com/PyO3/maturin/commit/0c6b8cc84eff72ed21098029aaba079b899dbee2]
|
|
|
|
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
|
|
---
|
|
src/python_interpreter/config.rs | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/python_interpreter/config.rs b/src/python_interpreter/config.rs
|
|
index d76606f2..5736aedc 100644
|
|
--- a/src/python_interpreter/config.rs
|
|
+++ b/src/python_interpreter/config.rs
|
|
@@ -306,7 +306,7 @@ impl InterpreterConfig {
|
|
format!(
|
|
".cpython-{}-{}-{}-{}.{}",
|
|
abi_tag,
|
|
- target.get_python_arch(),
|
|
+ target.get_python_ext_arch(interpreter_kind),
|
|
target.get_python_os(),
|
|
target_env,
|
|
file_ext,
|
|
@@ -319,7 +319,7 @@ impl InterpreterConfig {
|
|
major,
|
|
minor,
|
|
abi_tag,
|
|
- target.get_python_arch(),
|
|
+ target.get_python_ext_arch(interpreter_kind),
|
|
target.get_python_os(),
|
|
target_env,
|
|
file_ext,
|
|
@@ -330,7 +330,7 @@ impl InterpreterConfig {
|
|
format!(
|
|
".{}-{}-{}.{}",
|
|
abi_tag.replace('_', "-"),
|
|
- target.get_python_arch(),
|
|
+ target.get_python_ext_arch(interpreter_kind),
|
|
target.get_python_os(),
|
|
file_ext,
|
|
)
|
|
@@ -341,7 +341,7 @@ impl InterpreterConfig {
|
|
format!(
|
|
".cpython-{}-{}-{}.{}",
|
|
abi_tag,
|
|
- target.get_python_arch(),
|
|
+ target.get_python_ext_arch(interpreter_kind),
|
|
target.get_python_os(),
|
|
file_ext
|
|
)
|
|
--
|
|
2.34.1
|
|
|