classes/meson: set python install locations in the cross file
PATCH 1/5 classes/meson: set python install locations in the cross file
Instead of needing recipes to inherit python3targetconfig so that Python when asked will report the correct target directory to install into, we can pass the right directory via meson's cross file.
This means recipes that currently inherit python3targetconfig to get this path no longer need to.
--- meta/classes-recipe/meson.bbclass | 2 ++ 1 file changed, 2 insertions(+)
meta/classes-recipe/meson.bbclass +2 -0
@@ -94,6 +94,8 @@ c_args = ${@meson_array('CFLAGS', d)} c_link_args = ${@meson_array('LDFLAGS', d)} cpp_args = ${@meson_array('CXXFLAGS', d)} cpp_link_args = ${@meson_array('LDFLAGS', d)} +python.platlibdir = '${PYTHON_SITEPACKAGES_DIR}' +python.purelibdir = '${PYTHON_SITEPACKAGES_DIR}' [properties] needs_exe_wrapper = true
Signature · 1 line
2.43.0
PATCH 2/5 blueprint-compiler: inherit python3-dir not python3targetconfig
Now that meson.bbclass tells meson where to install Python files this recipe just needs to know the value of PYTHON_SITEPACKAGES_DIR for FILES, so just inherit python3-dir to remove a dependency on the target python recipe.
--- .../blueprint-compiler/blueprint-compiler_0.20.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/blueprint-compiler/blueprint-compiler_0.20.4.bb +1 -1
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404" SRC_URI = "git://gitlab.gnome.org/GNOME/blueprint-compiler;protocol=https;branch=blueprint-0-20;tag=v${PV}" SRCREV = "31b62c24a72c1670d2d93dcdf2d130f1ae12778e" -inherit meson pkgconfig python3targetconfig +inherit meson pkgconfig python3-dir PACKAGES += "${PN}-python"
Signature · 1 line
2.43.0
PATCH 3/5 python3-pycairo: inherit python3-dir not python3targetconfig
In reply to Ross BurtonNow that meson.bbclass tells meson where to install Python files this recipe just needs to know the value of PYTHON_SITEPACKAGES_DIR for FILES, so just inherit python3-dir to remove a dependency on the target python recipe.
--- meta/recipes-devtools/python/python3-pycairo_1.29.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-pycairo_1.29.0.bb +1 -1
@@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "f3f7fde97325cae80224c09f12564ef58d0d0f655da0e3b040f5807bd5 S = "${UNPACKDIR}/pycairo-${PV}" -inherit meson pkgconfig python3targetconfig github-releases +inherit meson pkgconfig python3-dir github-releases CFLAGS += "-fPIC"
Signature · 1 line
2.43.0
PATCH 4/5 at-spi2-core: inherit python3-dir not python3targetconfig
In reply to Ross BurtonNow that meson.bbclass tells meson where to install Python files this recipe just needs to know the value of PYTHON_SITEPACKAGES_DIR for FILES, so just inherit python3-dir to remove a dependency on the target python recipe.
--- meta/recipes-support/atk/at-spi2-core_2.60.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/atk/at-spi2-core_2.60.4.bb +1 -1
@@ -23,7 +23,7 @@ DEPENDS = " \ PROVIDES += "atk at-spi2-atk" RPROVIDES:${PN} += "atk at-spi2-atk" -inherit gnomebase gi-docgen gettext systemd upstream-version-is-even gobject-introspection python3targetconfig +inherit gnomebase gi-docgen gettext systemd upstream-version-is-even gobject-introspection python3-dir EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \ -Ddbus_daemon=${bindir}/dbus-daemon"
Signature · 1 line
2.43.0
PATCH 5/5 kea: fix python module packaging
In reply to Ross BurtonThis was previously installing into the wrong target directory because it was using the python3-native's directory layout.
Now that meson.bbclass is telling meson where to put files, we need to inherit python3-dir and package the correct files.
--- meta/recipes-connectivity/kea/kea_3.0.3.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/kea/kea_3.0.3.bb +2 -2
@@ -25,7 +25,7 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.xz \ " SRC_URI[sha256sum] = "09702ddb078b637e85de9236cbedd3fb9d7af7c6e797026c538b45748ad4d631" -inherit meson pkgconfig systemd update-rc.d upstream-version-is-even +inherit meson pkgconfig systemd update-rc.d upstream-version-is-even python3-dir # install-umask can be removed when upgrading to 3.1.19 onwards # https://gitlab.isc.org/isc-projects/kea/-/commit/d9f332a6f36f8056a54b0698d4672a67aea812ba
@@ -101,7 +101,7 @@ CONFFILES:${PN} = "${sysconfdir}/kea/kea-ctrl-agent.conf \ " PACKAGES =+ "${PN}-python" -FILES:${PN}-python = "${nonarch_libdir}/python*/site-packages/*" +FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" RDEPENDS:${PN}-python = "python3" FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
Signature · 1 line
2.43.0