classes/meson: set python install locations in the cross file
PATCH v2 1/6 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 v2 2/6 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 v2 3/6 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
Re: [OE-core] [PATCH v2 3/6] python3-pycairo: inherit python3-dir not python3targetconfig
Quoted 21 lines · Ross Burton via lists.openembedded.org
Now that meson.bbclass tells meson where to install Python files this recipe just needs to know the value of
PYTHON_SITEPACKAGES_DIRfor FILES, so just inherit python3-dir to remove a dependency on the target python recipe.Signed-off-by Ross Burton <[email protected]>--- 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 +0
-0@@ -17,7 +17,7 @@ SRC_URI[sha256sum] ="
f3f7fde97325cae80224c09f12564ef58d0d0f655da0e3b040f5807bd5S = "${UNPACKDIR}/pycairo-${PV}"
meta/recipes-devtools/python/python3-pycairo_1.29.0.bb SRC_URI[sha256sum] = "f3f7fde97325cae80224c09f12564ef58d0d0f655da0e3b040f5807bd5 · line 20
Quoted 2 lines
meta/recipes-devtools/python/python3-pycairo_1.29.0.bb +1
-1-inherit meson pkgconfig python3targetconfig github-releases +inherit meson pkgconfig python3-dir github-releases
This change introduces a regression than can be verified with:
bitbake python3-pycairo -c do_install -f
file /work/build/tmp/work/*/python3-pycairo/*/image/usr/lib/python*/site-packages/cairo/_cairo.cpython-*-linux-gnu.so
This will change the arch on the library name from "aarch64" to "x86_64" when we build for arm64 target.
+ /work/build/tmp/work/armv8a-oe-linux/python3-pycairo/1.29.1/image/usr/lib/python3.14/site-packages/cairo/_ cairo.cpython-314-x86_64-linux-gnu.so: ELF 64-bit LSB shared object, ARM
aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f787b1386510f091a34cb71fd91929e14128dc1e, with debug_info,
not stripped
- /work/build/tmp/work/armv8a-oe-linux/python3-pycairo/1.29.1/image/usr/lib/python3.14/site-packages/cairo/_ cairo.cpython-314-aarch64-linux-gnu.so: ELF 64-bit LSB shared object, ARM
aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f787b1386510f091a34cb71fd91929e14128dc1e, with debug_info,
not stripped
Jose
Quoted 18 lines
CFLAGS += "-fPIC"
--
2.43.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#240039):
https://lists.openembedded.org/g/openembedded-core/message/240039
Mute This Topic: https://lists.openembedded.org/mt/120082280/10043485
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 4/6 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 v2 5/6 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.2.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/kea/kea_3.2.0.bb +2 -2
@@ -22,7 +22,7 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.xz \ " SRC_URI[sha256sum] = "14bf695d37b65b9b1bf550fea5d0adaf9806c50e5419ef2a176a4b8e9aade3df" -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
@@ -98,7 +98,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
PATCH v2 6/6 kea: remove obsolete staticdev packaging
In reply to Ross BurtonKea doesn't build pointless static libraries for dynamically loaded modules anymore, so remove this line.
--- meta/recipes-connectivity/kea/kea_3.2.0.bb | 1 - 1 file changed, 1 deletion(-)
meta/recipes-connectivity/kea/kea_3.2.0.bb +0 -1
@@ -101,5 +101,4 @@ PACKAGES =+ "${PN}-python" FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" RDEPENDS:${PN}-python = "python3" -FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" FILES:${PN} += "${libdir}/hooks/*.so"
Signature · 1 line
2.43.0