diff mbox series

[meta-python,3/5] python3-uefi-firmware: Switch to python_setuptools_build_meta

Message ID 20260729052901.2147056-3-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-python,1/5] python3-thrift: Switch to python_setuptools_build_meta | expand

Commit Message

Khem Raj July 29, 2026, 5:28 a.m. UTC
From: Khem Raj <raj.khem@gmail.com>

uefi-firmware-parser's pyproject.toml declares setuptools.build_meta as its
build backend, so setuptools3 is the wrong class and do_check_backend warns:

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

Unlike setup.py, pyproject-build honours the declared build requirements, so
the setuptools_scm dependency has to be provided explicitly, otherwise
do_compile fails with:

  ERROR Unmet dependencies ...
	setuptools-scm>=8.0
		wanted: >=8.0
		found: not installed

setup.py passes use_scm_version to setup(), which was silently discarded
before ("Unknown distribution option: 'use_scm_version'"), so the package used
to ship its metadata as uefi_firmware-0.0.0.dist-info. Pin the version to
${PV} so the directory is now correctly named uefi_firmware-1.16.dist-info.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../recipes-devtools/python/python3-uefi-firmware_1.16.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-uefi-firmware_1.16.bb b/meta-python/recipes-devtools/python/python3-uefi-firmware_1.16.bb
index 8ad195d7ae..a5d9011094 100644
--- a/meta-python/recipes-devtools/python/python3-uefi-firmware_1.16.bb
+++ b/meta-python/recipes-devtools/python/python3-uefi-firmware_1.16.bb
@@ -11,7 +11,13 @@  SRC_URI = "git://github.com/theopolis/uefi-firmware-parser;protocol=https;branch

 SRCREV = "e202e576cefd1fefb3f510237bbd0aea8aedca07"

-inherit setuptools3
+DEPENDS += "python3-setuptools-scm-native"
+
+inherit python_setuptools_build_meta
+
+# The tarball is built from a git tag, so let setuptools_scm use ${PV}
+# instead of deriving a version from the checkout.
+export SETUPTOOLS_SCM_PRETEND_VERSION = "${PV}"

 RDEPENDS:${PN} += " \
     python3-ctypes \