Created attachment 252539 [details] v0 On this version, devel/py-setuptools fails to build or run under PEP-517: https://github.com/pypa/setuptools/issues/4333 https://github.com/pypa/pyproject-hooks/issues/192 Two upstream pull request variants are open, this patch uses the one without introducing an additional devel/py-importlib-metadata dependency: https://github.com/pypa/pyproject-hooks/pull/199
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=281005ac6d0d21a003e5a975aa94dc0c527cb855 commit 281005ac6d0d21a003e5a975aa94dc0c527cb855 Author: Charlie Li <vishwin@freebsd.org> AuthorDate: 2024-08-15 09:47:17 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-08-15 11:53:27 +0000 devel/py-pyproject_hooks: Fix entry-point loading - Bump PORTREVISION for package change PR: 280646 Obtained from: https://github.com/pypa/pyproject-hooks/pull/199 devel/py-pyproject_hooks/Makefile | 4 ++++ devel/py-pyproject_hooks/distinfo | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-)
(In reply to Charlie Li from comment #0) The addition of "LICENSE_FILE=${WRKSRC}/LICENSE" in attachment 252539 [details] is incorrect, therefore I removed it. Thanks.
Backing out this change seems to fix py38 and py39 builds for at least: devel/py-incremental devel/py-setuptools-scm Build error is: AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
(In reply to John Hein from comment #3) This will not be backed out especially since the exact pull request/commit has been incorporated into the next/latest upstream release 1.2.0.
(In reply to Charlie Li from comment #4) Yes, understood. My observation is mostly for documentation. It seems that setuptools 63.1.0 and pyproject_hooks > 1.1.0 (1.1.0_1 or 1.2.0) are fatal for some pep517 builds with python 3.8 and 3.9. I don't fully understand the root cause yet except it's somewhere in the depths of the importlib / entry hooks / module dependency implementation. Maybe there's an elegant fix for older python (but that would be lower priority than some of the other work). Both of the ports that have so far been observed to be affected (py-incremental 24.7.2 and py-setuptools-scm 8.0.4) DO build with setuptools 75.1.0 and the latest pyproject_hooks (1.1.0_1 or 1.2.0). And, yes, I am aware of the pending update for setuptools and the blockers for it.