loader expects it to be called with 'linux-gnu' e.g
rpds.cpython-312-x86_64-linux-musl.so is created with musl
but loader expects it to called rpds.cpython-312-x86_64-linux-gnu.so

Lets create the symlink to please the loader.

Fixes
ImportError while importing test module 
'/usr/lib/python3-rpds-py/ptest/tests/test_hash_trie_map.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_hash_trie_map.py:36: in <module>
    from rpds import HashTrieMap
../../python3.12/site-packages/rpds/__init__.py:1: in <module>
    from .rpds import *
E   ModuleNotFoundError: No module named 'rpds.rpds'
ERROR: tests/test_hash_trie_map.py:tests/test_hash_trie_map.py

Signed-off-by: Khem Raj <[email protected]>
---
 .../recipes-devtools/python/python3-rpds-py_0.18.1.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta/recipes-devtools/python/python3-rpds-py_0.18.1.bb 
b/meta/recipes-devtools/python/python3-rpds-py_0.18.1.bb
index f46df1115c8..b1f0e100332 100644
--- a/meta/recipes-devtools/python/python3-rpds-py_0.18.1.bb
+++ b/meta/recipes-devtools/python/python3-rpds-py_0.18.1.bb
@@ -27,4 +27,15 @@ do_install_ptest() {
     cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
 }
 
+do_install:append() {
+    for f in ${D}/${PYTHON_SITEPACKAGES_DIR}/rpds/rpds.cpython*.so
+    do
+        fname=`basename $f`
+        lname=`echo $fname | sed 's/musl/gnu/'`
+        if [ "$fname" != "$lname" ]; then
+            mv $f ${D}/${PYTHON_SITEPACKAGES_DIR}/rpds/$lname
+        fi
+    done
+}
+
 BBCLASSEXTEND = "native nativesdk"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200269): 
https://lists.openembedded.org/g/openembedded-core/message/200269
Mute This Topic: https://lists.openembedded.org/mt/106465307/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to