From 050286a953034e4b3bd607dae641b0aa7ff765c3 Mon Sep 17 00:00:00 2001 From: alperak Date: Mon, 15 Apr 2024 21:19:59 +0300 Subject: 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 Signed-off-by: Khem Raj --- .../telepathy/telepathy-python3_0.15.19.bb | 12 ++++++------ .../recipes-devtools/python/python3-dateutil_2.9.0.bb | 2 +- .../recipes-devtools/python/python3-pydantic-core_2.16.3.bb | 4 ++-- meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb | 2 +- meta-python/recipes-devtools/python/python3-tornado_6.4.bb | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'meta-python') diff --git a/meta-python/recipes-connectivity/telepathy/telepathy-python3_0.15.19.bb b/meta-python/recipes-connectivity/telepathy/telepathy-python3_0.15.19.bb index 31f6ae37fc..23c2165047 100644 --- a/meta-python/recipes-connectivity/telepathy/telepathy-python3_0.15.19.bb +++ b/meta-python/recipes-connectivity/telepathy/telepathy-python3_0.15.19.bb @@ -20,14 +20,14 @@ SRC_URI[md5sum] = "f7ca25ab3c88874015b7e9728f7f3017" SRC_URI[sha256sum] = "244c0e1bf4bbd78ae298ea659fe10bf3a73738db550156767cc2477aedf72376" FILES:${PN} += "\ - ${libdir}/python*/site-packages/telepathy/*.py \ - ${libdir}/python*/site-packages/telepathy/*/*.py \ + ${PYTHON_SITEPACKAGES_DIR}/telepathy/*.py \ + ${PYTHON_SITEPACKAGES_DIR}/telepathy/*/*.py \ " do_install:append () { - rm -fr ${D}${libdir}/python*/site-packages/telepathy/__pycache__ - rm -fr ${D}${libdir}/python*/site-packages/telepathy/__pycache__ - rm -fr ${D}${libdir}/python*/site-packages/telepathy/*/__pycache__ - rm -fr ${D}${libdir}/python*/site-packages/telepathy/*/__pycache__ + rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/telepathy/__pycache__ + rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/telepathy/__pycache__ + rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/telepathy/*/__pycache__ + rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/telepathy/*/__pycache__ } RDEPENDS:${PN} += "python3-dbus" diff --git a/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb b/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb index ac76ccc96a..1f7a4a03fd 100644 --- a/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb +++ b/meta-python/recipes-devtools/python/python3-dateutil_2.9.0.bb @@ -10,7 +10,7 @@ PYPI_PACKAGE = "python-dateutil" inherit pypi python_setuptools_build_meta PACKAGES =+ "${PN}-zoneinfo" -FILES:${PN}-zoneinfo = "${libdir}/${PYTHON_DIR}/site-packages/dateutil/zoneinfo" +FILES:${PN}-zoneinfo = "${PYTHON_SITEPACKAGES_DIR}/dateutil/zoneinfo" DEPENDS += "python3-setuptools-scm-native" diff --git a/meta-python/recipes-devtools/python/python3-pydantic-core_2.16.3.bb b/meta-python/recipes-devtools/python/python3-pydantic-core_2.16.3.bb index 934e3e2bb2..faa291ea6d 100644 --- a/meta-python/recipes-devtools/python/python3-pydantic-core_2.16.3.bb +++ b/meta-python/recipes-devtools/python/python3-pydantic-core_2.16.3.bb @@ -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 } diff --git a/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb b/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb index 540aa62006..2a6993c141 100644 --- a/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb +++ b/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb @@ -22,7 +22,7 @@ PACKAGES =+ "\ " FILES:${PN}-test += "\ - ${libdir}/${PYTHON_DIR}/site-packages/*/tests \ + ${PYTHON_SITEPACKAGES_DIR}/*/tests \ " RDEPENDS:${PN} += "\ diff --git a/meta-python/recipes-devtools/python/python3-tornado_6.4.bb b/meta-python/recipes-devtools/python/python3-tornado_6.4.bb index 08c8672ebe..b01c1cec2a 100644 --- a/meta-python/recipes-devtools/python/python3-tornado_6.4.bb +++ b/meta-python/recipes-devtools/python/python3-tornado_6.4.bb @@ -35,7 +35,7 @@ PACKAGES =+ "\ " FILES:${PN}-test = " \ - ${libdir}/${PYTHON_DIR}/site-packages/*/test \ + ${PYTHON_SITEPACKAGES_DIR}/*/test \ " BBCLASSEXTEND += "native nativesdk" -- cgit v1.2.3-54-g00ecf