python_pep517.bbclass: export _PYTHON_HOST_PLATFORM to match our cross-compile target
PATCH v2 1/1 python_pep517.bbclass: export _PYTHON_HOST_PLATFORM to match our cross-compile target
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 <[email protected]>
--- meta/classes-recipe/python_pep517.bbclass | 4 ++++ 1 file changed, 4 insertions(+)
meta/classes-recipe/python_pep517.bbclass +4 -0
@@ -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 () {
Signature · 1 line
2.43.0