python3-pydantic-core: Rename the cpython module on musl

wheel contains site-package .so named linux-musl which is not loadable
on musl systems, rename it to linux-gnu even on musl like other python
dynamic modules.

This fixed ptest runs for both pydantic-core and pydantic recipes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2024-01-06 21:06:33 -08:00
parent 1a05731de4
commit 34794c0c28
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -34,6 +34,17 @@ RDEPENDS:${PN}-ptest += "\
python3-unittest-automake-output \
"
do_install:append() {
for f in ${D}/${libdir}/${PYTHON_DIR}/site-packages/pydantic_core/_pydantic_core.*.so
do
fname=`basename $f`
lname=`echo $fname | sed 's/musl/gnu/'`
if [ "$fname" != "$lname" ]; then
mv $f ${D}/${libdir}/${PYTHON_DIR}/site-packages/pydantic_core/$lname
fi
done
}
do_install_ptest() {
cp -rf ${S}/tests/ ${D}${PTEST_PATH}/
rm -rf ${D}${PTEST_PATH}/tests/benchmarks