mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
0a1908b422
ok tb@
26 lines
899 B
Plaintext
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,
|