Skip to content

Commit 2b0251d

Browse files
committed
www/py-html5lib: fix build with newer setuptools
Use an upstream pull request [0] to handle ast.Str deprecation/removal, as the existing patch fails: Traceback (most recent call last): File "/usr/local/lib/python3.13t/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() ~~~~^^ File "/usr/local/lib/python3.13t/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel return hook(config_settings) File "/usr/local/lib/python3.13t/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() ~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13t/site-packages/setuptools/build_meta.py", line 520, in run_setup super().run_setup(setup_script=setup_script) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) ~~~~^^^^^^^^^^^^^^^^ File "<string>", line 96, in <module> File "/usr/local/lib/python3.13t/site-packages/setuptools/__init__.py", line 117, in setup return distutils.core.setup(**attrs) # type: ignore[return-value] ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/setuptools/_distutils/core.py", line 148, in setup _setup_distribution = dist = klass(attrs) ~~~~~^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/setuptools/dist.py", line 332, in __init__ self.metadata.version = self._normalize_version(self.metadata.version) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/setuptools/dist.py", line 368, in _normalize_version normalized = str(Version(version)) ~~~~~~~^^^^^^^^^ File "/usr/local/lib/python3.13t/site-packages/packaging/version.py", line 359, in __init__ match = self._regex.fullmatch(version) TypeError: expected string or bytes-like object, got 'Constant' While here: - remove all references to pkg_resources, removed in setuptools 82+ - switch to USE_PYTHON=pep517 [0] html5lib/html5lib-python#589 PR: 293763 Approved by: rm (maintainer)
1 parent 8a3afc3 commit 2b0251d

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

www/py-html5lib/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
PORTNAME= html5lib
22
PORTVERSION= 1.1
3-
PORTREVISION= 1
3+
PORTREVISION= 2
44
CATEGORIES= www python
55
MASTER_SITES= PYPI
66
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
77

8+
PATCH_SITES= https://github.com/html5lib/html5lib-python/commit/
9+
PATCHFILES= b90dafff1bf342d34d539098013d0b9f318c7641.patch:-p1 \
10+
2ba10ae9c0852318aee4dfece8cd8b49bfe48682.patch:-p1
11+
812
MAINTAINER= rm@FreeBSD.org
913
COMMENT= Python based HTML parser based on the HTML5 spec
1014
WWW= https://github.com/html5lib/html5lib-python
1115

1216
LICENSE= MIT
1317
LICENSE_FILE= ${WRKSRC}/LICENSE
1418

19+
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
20+
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
1521
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
1622
${PYTHON_PKGNAMEPREFIX}webencodings>0:converters/py-webencodings@${PY_FLAVOR}
1723

1824
NO_ARCH= yes
1925
USES= cpe python
20-
USE_PYTHON= autoplist distutils
26+
USE_PYTHON= autoplist pep517
2127

2228
.include <bsd.port.mk>

www/py-html5lib/distinfo

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
TIMESTAMP = 1681809284
1+
TIMESTAMP = 1773329494
22
SHA256 (html5lib-1.1.tar.gz) = b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f
33
SIZE (html5lib-1.1.tar.gz) = 272215
4+
SHA256 (b90dafff1bf342d34d539098013d0b9f318c7641.patch) = 293065ee2c2592ff2536c43dc1aabb5e2f0753b0f986d26a3075d4650a1628b7
5+
SIZE (b90dafff1bf342d34d539098013d0b9f318c7641.patch) = 1465
6+
SHA256 (2ba10ae9c0852318aee4dfece8cd8b49bfe48682.patch) = 8c020776667b58f2306f16861ae3821c7172b564aeacc99fdfbbcf9170f9c9da
7+
SIZE (2ba10ae9c0852318aee4dfece8cd8b49bfe48682.patch) = 2238

www/py-html5lib/files/patch-setup.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)