Files
buildroot/package/python-pkg-resources/0002-Add-build-metadata-for-the-standalone-package.patch
James Hilliard 93ad9e63dd package/python-pkg-resources: new host package
Setuptools 82 removed pkg_resources, but older U-Boot Binman versions
still use it. Package the standalone PyPA snapshot so these consumers
can keep working when setuptools is updated.

Add a small setuptools pyproject.toml to build the module from its
repository-root layout, and include the license addition proposed
upstream. Supply packaging, jaraco.text and platformdirs explicitly,
as the standalone module imports all three at runtime.

Add a host runtime test covering resource access, dependency resolution
and cache lookup.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
2026-10-24 16:57:43 +02:00

40 lines
1.1 KiB
Diff

From: James Hilliard <james.hilliard1@gmail.com>
Date: Tue, 13 Oct 2026 16:36:30 -0600
Subject: [PATCH] Add build metadata for the standalone package
Build the extracted pkg_resources module as a standalone wheel, mapping
the package to the repository root. Use a static version for this snapshot
so building an archive does not need setuptools-scm or Git metadata.
Upstream: Not applicable [Buildroot snapshot metadata]
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
pyproject.toml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 pyproject.toml
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,19 @@
+[build-system]
+requires = ["setuptools>=77"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "pkg_resources"
+version = "0.0.0+git.7fa76c17"
+requires-python = ">=3.9"
+license = "MIT"
+license-files = ["LICENSE"]
+dependencies = [
+ "packaging>=24.2",
+ "jaraco.text>=3.7",
+ "platformdirs>=4.2.2",
+]
+
+[tool.setuptools]
+packages = ["pkg_resources"]
+package-dir = {pkg_resources = "."}