Use PYTHON_SITEPACKAGES_DIR instead of hard-coded site-packages directory path

The following paths have been replaced with PYTHON_SITEPACKAGES_DIR:

- "${libdir}/${PYTHON_DIR}/site-packages"
- "${libdir}/python${PYTHON_BASEVERSION}/site-packages"
- "${libdir}/python*/site-packages"
- "${libdir}/python3.*/site-packages"

Signed-off-by: alperak <alperyasinak1@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
alperak
2024-04-15 21:19:59 +03:00
committed by Khem Raj
parent 43fefa0daf
commit 050286a953
20 changed files with 39 additions and 39 deletions

View File

@@ -36,12 +36,12 @@ RDEPENDS:${PN}-ptest += "\
"
do_install:append() {
for f in ${D}/${libdir}/${PYTHON_DIR}/site-packages/pydantic_core/_pydantic_core.*.so
for f in ${D}/${PYTHON_SITEPACKAGES_DIR}/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
mv $f ${D}/${PYTHON_SITEPACKAGES_DIR}/pydantic_core/$lname
fi
done
}