From: Ross Burton Date: Wed, 30 Jul 2025 16:03:31 +0000 (+0100) Subject: classes/python_pep517: centralise shared inherits X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=449b226aca6a5db378dc5576dde47499925dfb26;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git classes/python_pep517: centralise shared inherits For the build process to actually work some inherits are always needed: - python3native for the python that is actually running build. - setuptools3-base (badly named) defines how to build extensions and where to put modules. Instead of inheriting these in every class, inherit them once in the python_pep517 class. Signed-off-by: Ross Burton Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/python_flit_core.bbclass b/meta/classes-recipe/python_flit_core.bbclass index c5480654f3..cb40ab0faf 100644 --- a/meta/classes-recipe/python_flit_core.bbclass +++ b/meta/classes-recipe/python_flit_core.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -inherit python_pep517 python3native python3-dir setuptools3-base +inherit python_pep517 DEPENDS += "python3-flit-core-native" diff --git a/meta/classes-recipe/python_hatchling.bbclass b/meta/classes-recipe/python_hatchling.bbclass index b5a3c3feea..6765ddbe8c 100644 --- a/meta/classes-recipe/python_hatchling.bbclass +++ b/meta/classes-recipe/python_hatchling.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -inherit python_pep517 python3native python3-dir setuptools3-base +inherit python_pep517 DEPENDS += "python3-hatchling-native" diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass index 37b231cef5..3613ea19c7 100644 --- a/meta/classes-recipe/python_mesonpy.bbclass +++ b/meta/classes-recipe/python_mesonpy.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -inherit meson setuptools3-base python3targetconfig python_pep517 +inherit meson python_pep517 # meson_do_qa_configure does the wrong thing here because # mesonpy runs "meson setup ..." in do_compile context. diff --git a/meta/classes-recipe/python_pep517.bbclass b/meta/classes-recipe/python_pep517.bbclass index 2c144d39b3..4935b2cbe9 100644 --- a/meta/classes-recipe/python_pep517.bbclass +++ b/meta/classes-recipe/python_pep517.bbclass @@ -10,6 +10,8 @@ # This class will build a wheel in do_compile, and use pypa/installer to install # it in do_install. +inherit python3native python3-dir setuptools3-base + DEPENDS:append = " python3-build-native python3-installer-native" # Where to execute the build process from diff --git a/meta/classes-recipe/python_poetry_core.bbclass b/meta/classes-recipe/python_poetry_core.bbclass index c7dc5d0382..35a2f137cb 100644 --- a/meta/classes-recipe/python_poetry_core.bbclass +++ b/meta/classes-recipe/python_poetry_core.bbclass @@ -4,6 +4,6 @@ # SPDX-License-Identifier: MIT # -inherit python_pep517 python3native setuptools3-base +inherit python_pep517 DEPENDS += "python3-poetry-core-native" diff --git a/meta/classes-recipe/python_setuptools_build_meta.bbclass b/meta/classes-recipe/python_setuptools_build_meta.bbclass index 046b4ffb74..f09f7e9a91 100644 --- a/meta/classes-recipe/python_setuptools_build_meta.bbclass +++ b/meta/classes-recipe/python_setuptools_build_meta.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -inherit setuptools3-base python_pep517 +inherit python_pep517 DEPENDS += "python3-setuptools-native python3-wheel-native"