From: Alejandro Hernandez <alhe@linux.microsoft.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2] python_pep517.bbclass: export _PYTHON_HOST_PLATFORM to match our cross-compile target
Date: Thu, 6 Aug 2026 17:28:21 +0000 [thread overview]
Message-ID: <20260806172821.4087020-1-alhe@linux.microsoft.com> (raw)
When the _PYTHON_HOST_PLATFORM environment variable is unset, the value falls
back to the build host architecture, therefore, python wheels get an incorrect
platform tag, setting it as an empty value is also not allowed on python > 3.14.
Set _PYTHON_HOST_PLATFORM as HOST_ARCH dependent so bitbake correctly tags wheels
depending on our cross-compile target, fixing reproducibility issues.
Assisted-by: AI - OpenAI
Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
---
meta/classes-recipe/python_pep517.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes-recipe/python_pep517.bbclass b/meta/classes-recipe/python_pep517.bbclass
index d6246af5c2..a3c7d704d6 100644
--- a/meta/classes-recipe/python_pep517.bbclass
+++ b/meta/classes-recipe/python_pep517.bbclass
@@ -30,6 +30,10 @@ PEP517_INSTALL_PYTHON:class-native = "nativepython3"
# pypa/installer option to control the bytecode compilation
INSTALL_WHEEL_COMPILE_BYTECODE ?= "--compile-bytecode=0"
+# Python wheels are tagged with the HOST platform when built, use HOST_ARCH
+# since we are cross-compiling, avoiding incorrect host or an empty tag
+export _PYTHON_HOST_PLATFORM = "linux-${HOST_ARCH}"
+
# PEP517 doesn't have a specific configure step, so set an empty do_configure to avoid
# running base_do_configure.
python_pep517_do_configure () {
--
2.43.0
reply other threads:[~2026-08-06 17:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260806172821.4087020-1-alhe@linux.microsoft.com \
--to=alhe@linux.microsoft.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox