From f25a46a3df0a2695a6dee117f8f2f26db7636cd3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 4 Mar 2022 00:00:02 -0800 Subject: [PATCH] python3-crc32c: set target platform via setup.cfg Do not poke at build system for finding platform platform is target specific and when cross compiling it should be detected differently, in this case lets pass it via environment so that it can be set in recipe Looks like we're not the first to need to specify the target platform [1] when building this package. According to upstream, we can just update setup.cfg instead of patching setup.py. [1] https://github.com/ICRAR/crc32c/pull/10 Signed-off-by: Justin Bronder Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-crc32c_2.2.post0.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-python/recipes-devtools/python/python3-crc32c_2.2.post0.bb b/meta-python/recipes-devtools/python/python3-crc32c_2.2.post0.bb index f58760761a0..4f6a3aba998 100644 --- a/meta-python/recipes-devtools/python/python3-crc32c_2.2.post0.bb +++ b/meta-python/recipes-devtools/python/python3-crc32c_2.2.post0.bb @@ -13,4 +13,10 @@ SRC_URI[sha256sum] = "3d058e7a5e37e4985d1a7ad4cb702bca56b490daa658d4851377d13ead inherit pypi setuptools3 +do_compile:prepend() { + if ! grep 'platform =' setup.cfg; then + printf "[build_ext]\nplatform = ${TARGET_ARCH}" >> setup.cfg + fi +} + RDEPENDS:${PN} += "python3-core"