aports/main/py3-html5lib/setuptools-82.patch
mio 13247da08a main/py3-html5lib: fix build with python 3.14 and setuptools 82
Fix `AttributeError: module 'ast' has no attribute 'Str'` error due to
the removal of `ast.Str` in python 3.14.

Fix `ModuleNotFoundError: No module named 'pkg_resources'` error due to
the removal of `pkg_resources` in setuptools 82.
2026-03-04 10:52:35 +00:00

19 lines
452 B
Diff

Patch-Source: https://github.com/html5lib/html5lib-python/pull/592#discussion_r2867665876
---
--- a/setup.py
+++ b/setup.py
@@ -6,9 +6,11 @@ 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