diff mbox series

[meta-python] python3-grpcio-tools: Use python_setuptools_build_meta

Message ID 20261027165958.937291-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-python] python3-grpcio-tools: Use python_setuptools_build_meta | expand

Commit Message

Khem Raj Oct. 27, 2026, 4:59 p.m. UTC
pyproject.toml specifies setuptools.build_meta as the build backend, so
inherit python_setuptools_build_meta instead of setuptools3. Fixes:

QA Issue: inherits setuptools3 but has pyproject.toml specifying backend
setuptools.build_meta, use the correct class [pep517-backend]

pyproject-build checks the build requirements, so add the wheel and
Cython build dependencies and relax the strict Cython==3.1.1 pin, as
python3-grpcio already does. The C++ sources are pre-generated, so
Cython is not actually run.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../python/python3-grpcio-tools_1.84.1.bb                 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.84.1.bb b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.84.1.bb
index 3f7f64c076..91d14f719a 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.84.1.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.84.1.bb
@@ -5,14 +5,18 @@  SECTION = "devel/python"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=0bcf70029ff7f40a132bf95381ee0b2d"

-inherit pypi setuptools3
+inherit pypi python_setuptools_build_meta cython

-DEPENDS += "python3-grpcio"
+DEPENDS += "python3-grpcio python3-wheel-native"

 SRC_URI[sha256sum] = "ca8a326df3441127d6709d992774844bb496db30b08f76ed5d1a912089e03f2c"

 RDEPENDS:${PN} = "python3-grpcio"

+do_configure:append() {
+    sed -i 's/"Cython==/"Cython>=/' ${S}/pyproject.toml
+}
+
 do_compile:prepend() {
     export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="${@oe.utils.parallel_make(d, False)}"
 }