Files
daniel 0a1908b422 Repair on Python 3.14
ok tb@
2025-11-18 02:37:26 +00:00

26 lines
899 B
Plaintext

Fix build on Python 3.14.
See: https://github.com/html5lib/html5lib-python/issues/588
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -89,9 +89,14 @@ with open(join(here, "html5lib", "__init__.py"), "rb")
for a in assignments:
if (len(a.targets) == 1 and
isinstance(a.targets[0], ast.Name) and
- a.targets[0].id == "__version__" and
- isinstance(a.value, ast.Str)):
- version = a.value.s
+ a.targets[0].id == "__version__"):
+ if hasattr(ast, "Str") and isinstance(a.value, ast.Str):
+ version = a.value.s
+ elif (hasattr(ast, "Constant")
+ and isinstance(a.value, ast.Constant)
+ and isinstance(a.value.value, str)):
+ version = a.value.value
+assert version is not None
setup(name='html5lib',
version=version,