Skip to contentSkip to conversation

python3-bleak: Use python_uv_build and drop the uv_build upper bound

PATCH New Khem Raj 1 participant 2 messages Aug 5

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 python3-bleak: Use python_uv_build and drop the uv_build upper bound

bleak's build backend is uv_build, but the recipe inherited python_poetry_core and then added python3-uv-build-native to DEPENDS by hand. Both classes are thin wrappers over python_pep517 that differ only in the native backend they pull in, and python_pep517 takes the backend from pyproject.toml, so inherit python_uv_build instead and drop the manual DEPENDS along with the unused poetry-core dependency.

The patch capped uv_build at <0.12.0, which the 0.11.32 -> 0.12.1 upgrade in oe-core invalidated:

ERROR Unmet dependencies (checked against .../nativepython3):
uv_build<0.12.0,>=0.10.9

This bound has now broken twice, and there is only ever one uv-build in the sysroot, so drop the upper bound rather than raise it again.

Verified on aarch64 for qemuarm64: do_compile fails before the change with the error above and both do_compile and do_package succeed after.

---
 ...leak-Support-newer-uv_build-versions.patch | 23 +++++++++++++++----
 .../python/python3-bleak_3.0.2.bb             |  6 +----
 2 files changed, 20 insertions(+), 9 deletions(-)
meta-python/recipes-devtools/python/python3-bleak/0001-bleak-Support-newer-uv_build-versions.patch +19 -4
index bead8f3be6..043d7887c0 100644
@@ -1,11 +1,26 @@
 From 2e0994321b57e547a3c1f7e1f225e55ca007e45f Mon Sep 17 00:00:00 2001
 From: Leon Anavi <[email protected]>
 Date: Mon, 15 Jun 2026 17:53:47 +0300
-Subject: [PATCH] bleak: Support newer uv_build versions
+Subject: [PATCH] bleak: Drop the uv_build upper version bound
 
-Support newer uv_build versions
+bleak 3.0.2 requires uv_build<0.11.0. OE builds wheels with
+"pyproject-build --no-isolation" against whatever python3-uv-build is in
+the sysroot, and that check is enforced:
 
-Upstream-Status: Submitted [https://github.com/hbldh/bleak/pull/2001]
+| * Getting build dependencies for wheel...
+|
+| ERROR Missing dependencies:
+|       uv_build>=0.10.9,<0.11.0
+
+Raising the bound just moves the problem to the next uv-build upgrade --
+it has already been hit twice, most recently by the 0.11.32 -> 0.12.1
+upgrade in oe-core. Since there is only ever one uv-build in the
+sysroot, drop the upper bound instead.
+
+Upstream merged a bump to <0.12.0 (https://github.com/hbldh/bleak/pull/2001)
+which will be in the next release, but that would need raising again too.
+
+Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Leon Anavi <[email protected]>
 ---
@@ -21,7 +36,7 @@ index 3224afc..4be6da7 100644
 
  [build-system]
 -requires = ["uv_build>=0.10.9,<0.11.0"]
-+requires = ["uv_build>=0.10.9,<0.12.0"]
++requires = ["uv_build>=0.10.9"]
  build-backend = "uv_build"
 
  [tool.uv.build-backend]
meta-python/recipes-devtools/python/python3-bleak_3.0.2.bb +1 -5
index c84b6bbc8d..022582e0e9 100644
@@ -8,14 +8,10 @@ SRC_URI:append = " \
 	file://0001-bleak-Support-newer-uv_build-versions.patch \
 "
 
-inherit pypi python_poetry_core ptest-python-pytest
+inherit pypi python_uv_build ptest-python-pytest
 
 SRC_URI[sha256sum] = "c2229cb8238d5876b4bd05c74bf7a1aea1f88da39d2e51ac9dfd5cc319d5265f"
 
-DEPENDS += "\
-	python3-uv-build-native \
-"
-
 RDEPENDS:${PN}-ptest += " \
 	python3-asyncio \
 	python3-pytest-asyncio \
author
#1 lore raw

PATCH 2/2 python3-cucumber-tag-expressions: Use python_uv_build and drop the uv_build upper bound

The 9.1.0 pyproject.toml sets build-backend = "uv_build" and lists only uv_build in its build-system requires, but the recipe inherited python_setuptools_build_meta and added python3-uv-build-native to DEPENDS by hand. Inherit python_uv_build instead, which drops the unused setuptools, wheel and setuptools-scm dependencies and the setuptools specific do_configure[cleandirs] workaround that came with the old class.

The patch capped uv_build at <0.12.0, which the 0.11.32 -> 0.12.1 upgrade in oe-core invalidated. This bound has now broken twice, and there is only ever one uv-build in the sysroot, so drop the upper bound rather than raise it again.

Verified on aarch64 for qemuarm64: do_compile and do_package succeed.

---
 ...ts-Relax-required-version-of-uv-to-be-0.12.patch | 13 ++++++++++---
 .../python3-cucumber-tag-expressions_9.1.0.bb       |  7 +------
 2 files changed, 11 insertions(+), 9 deletions(-)
meta-python/recipes-devtools/python/python3-cucumber-tag-expressions/0001-pyprojects-Relax-required-version-of-uv-to-be-0.12.patch +10 -3
index e389b99fce..7016aaa4b1 100644
@@ -1,15 +1,22 @@
 From 5cf10b111d61f00db2b3d9c8c6635fc31f3ceefd Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Thu, 14 May 2026 06:43:36 -0700
-Subject: [PATCH] pyprojects: Relax required version of uv to be < 0.12
+Subject: [PATCH] pyprojects: Drop the uv_build upper version bound
 
-Core now has 0.11.x and it fails this check
+Core builds wheels with "pyproject-build --no-isolation" against whatever
+python3-uv-build is in the sysroot, and the build-system requirement is
+enforced:
 
 | * Getting build dependencies for wheel...
 |
 | ERROR Missing dependencies:
 |       uv_build<0.11.0,>=0.10.0
 
+Raising the bound only defers the problem to the next uv-build upgrade;
+the 0.11.32 -> 0.12.1 upgrade in oe-core has already invalidated the
+previous <0.12.0 bound. Since there is only ever one uv-build in the
+sysroot, drop the upper bound instead.
+
 Upstream-Status: Inappropriate [OE Specific]
 
 Signed-off-by: Khem Raj <[email protected]>
@@ -25,7 +32,7 @@ index b0f253e..b39d0fd 100644
  [build-system]
  build-backend = "uv_build"
 -requires = ["uv_build>=0.10.0,<0.11.0"]
-+requires = ["uv_build>=0.10.0,<0.12.0"]
++requires = ["uv_build>=0.10.0"]
 
  [project]
  name = "cucumber-tag-expressions"
meta-python/recipes-devtools/python/python3-cucumber-tag-expressions_9.1.0.bb +1 -6
index e26f20ebb8..fea5a6d6b1 100644
@@ -7,11 +7,6 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=134f1026f0de92fd30
 SRC_URI += "file://0001-pyprojects-Relax-required-version-of-uv-to-be-0.12.patch"
 SRC_URI[sha256sum] = "d960383d5885300ebcbcb14e41657946fde2a59d5c0f485eb291bc6a0e228acc"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_uv_build
 
 PYPI_PACKAGE = "cucumber_tag_expressions"
-
-DEPENDS += "\
-    python3-setuptools-scm-native \
-    python3-uv-build-native \
-"