diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-11-05 19:02:56 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-11-05 19:02:56 +0000 |
| commit | 864ccd3aba62b24728eb0b963d8a1093555475c0 (patch) | |
| tree | bb5a89762d7f5ee123655bf5cdf9406b27dc1759 /dev-python/html5lib | |
| parent | 64f2ecf7f878941ddcb49fbeb10e26352844b683 (diff) | |
| download | baldeagleos-repo-864ccd3aba62b24728eb0b963d8a1093555475c0.tar.gz baldeagleos-repo-864ccd3aba62b24728eb0b963d8a1093555475c0.tar.xz baldeagleos-repo-864ccd3aba62b24728eb0b963d8a1093555475c0.zip | |
Adding metadata
Diffstat (limited to 'dev-python/html5lib')
| -rw-r--r-- | dev-python/html5lib/files/html5lib-1.2_pre20240221-py314.patch | 41 | ||||
| -rw-r--r-- | dev-python/html5lib/html5lib-1.2_pre20240221.ebuild | 4 |
2 files changed, 45 insertions, 0 deletions
diff --git a/dev-python/html5lib/files/html5lib-1.2_pre20240221-py314.patch b/dev-python/html5lib/files/html5lib-1.2_pre20240221-py314.patch new file mode 100644 index 000000000000..785f77b04c59 --- /dev/null +++ b/dev-python/html5lib/files/html5lib-1.2_pre20240221-py314.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/965490 +https://github.com/html5lib/html5lib-python/pull/589 + +From b90dafff1bf342d34d539098013d0b9f318c7641 Mon Sep 17 00:00:00 2001 +From: Andrew Sukach <andrew@sukach.org> +Date: Fri, 12 Sep 2025 21:53:31 -0700 +Subject: [PATCH] `setup.py`: fix version parsing on Python 3.14 (ast.Str + removed) + +Python 3.14 removes the ast.Str node type. String literals now appear +as ast.Constant(value=str). +Update the AST check to accept both ast.Str (for older Pythons) and +ast.Constant with a string value (for Python 3.8+), allowing html5lib to +build successfully on Python 3.14 while remaining compatible with older +version. +--- + setup.py | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/setup.py b/setup.py +index 30ee0575..42ab6f67 100644 +--- a/setup.py ++++ b/setup.py +@@ -92,9 +92,14 @@ def default_environment(): + 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, diff --git a/dev-python/html5lib/html5lib-1.2_pre20240221.ebuild b/dev-python/html5lib/html5lib-1.2_pre20240221.ebuild index 5bc0bebafcd2..085fbf42e565 100644 --- a/dev-python/html5lib/html5lib-1.2_pre20240221.ebuild +++ b/dev-python/html5lib/html5lib-1.2_pre20240221.ebuild @@ -40,6 +40,10 @@ RDEPEND=" >=dev-python/webencodings-0.5.1[${PYTHON_USEDEP}] " +PATCHES=( + "${FILESDIR}"/${PN}-1.2_pre20240221-py314.patch +) + EPYTEST_PLUGINS=( pytest-expect ) distutils_enable_tests pytest |
