[Buildroot] [PATCH 1/1] package/python-html5lib: fix build with python-setuptools >= 82

Bernd Kuhls bernd at kuhls.net
Sat Mar 14 13:50:39 UTC 2026


Buildroot commit 51365ff06379aaf6fcc9a751e8ff32ac694f3e92 bumped
python-setuptools from 80.9.0 to 82.0.0. This version removed
pkg_resources: https://github.com/pypa/setuptools/blob/v82.0.0/NEWS.rst

causing build errors:

  ModuleNotFoundError: No module named 'pkg_resources'

Fixes:
https://autobuild.buildroot.net/results/eeb/eeba81aecbb01117f7b7af24d0a6c02f3c32cf6e/

Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
 ...-handle-missing-pkg_resources-import.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/python-html5lib/0002-setup.py-handle-missing-pkg_resources-import.patch

diff --git a/package/python-html5lib/0002-setup.py-handle-missing-pkg_resources-import.patch b/package/python-html5lib/0002-setup.py-handle-missing-pkg_resources-import.patch
new file mode 100644
index 0000000000..1bb11476f3
--- /dev/null
+++ b/package/python-html5lib/0002-setup.py-handle-missing-pkg_resources-import.patch
@@ -0,0 +1,36 @@
+From 63dcd5797d9b7c92d9b605c08bae19dc5c1cf221 Mon Sep 17 00:00:00 2001
+From: Rui Chen <rui at chenrui.dev>
+Date: Mon, 9 Feb 2026 18:36:08 -0500
+Subject: [PATCH] setup.py: handle missing pkg_resources import
+
+Upstream: https://github.com/html5lib/html5lib-python/pull/592
+
+Signed-off-by: Rui Chen <rui at chenrui.dev>
+[Bernd: updated patch w.r.t
+ https://github.com/html5lib/html5lib-python/pull/592#discussion_r2867665876]
+Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
+---
+ setup.py | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 30ee057..0b7a2c2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -6,9 +6,10 @@ import sys
+ 
+ from os.path import join, dirname
+ from setuptools import setup, find_packages, __version__ as setuptools_version
+-from pkg_resources import parse_version
+-
+-import pkg_resources
++try:
++    import pkg_resources
++except ImportError:
++    pkg_resources = None
+ 
+ try:
+     import _markerlib.markers
+-- 
+2.47.3
+
-- 
2.47.3



More information about the buildroot mailing list