I get in poudriere for Python 3.10: adding license file 'LICENSE' writing manifest file 'src/setuptools_scm.egg-info/SOURCES.txt' ERROR Missing dependencies: tomli<=2.0.2; python_version < "3.11" *** Error code 1 Stop. make: stopped in /usr/ports/devel/py-setuptools-scm =>> Cleaning up wrkdir ===> Cleaning for py310-setuptools-scm-9.2.2 See: https://github.com/pypa/setuptools-scm/blob/e56b78fcd4c1e79aa36c1e4700fca34c8ff540fe/pyproject.toml#L7
Applied the following patch and it both built for me and the subsequent ports: root@deblndw011x:/var/poudriere/ports/default-head/devel/py-setuptools-scm (main %=) # cat files/patch-pyproject.toml --- pyproject.toml.orig 2026-03-01 18:01:34 UTC +++ pyproject.toml @@ -4,7 +4,7 @@ build-backend = "_own_version_helper:build_meta" requires = [ "setuptools>=61", - 'tomli<=2.0.2; python_version < "3.11"', + 'tomli>1; python_version < "3.11"', ] backend-path = [ ".",
See bug 286779, comment 13 and comment 14 (patch, similar to yours).
(In reply to John Hein from comment #2) Indeed, the exp-run was useless in this case...
Also see upstream: https://github.com/pypa/setuptools-scm/issues/1090#issuecomment-3275518020 https://github.com/pypa/setuptools-scm/issues/1222 The latter got some traction upstream after I pinged about the issue yesterday: https://github.com/RonnyPfannschmidt/setuptools_scm/commit/c35b53ac0dcbd0528521886612540ac6478509ee So a change has been finally committed upstream to address this, but not in any release yet including the 10.0.0 release from a few days ago - not avalaible at pypi.org yet. see https://github.com/pypa/setuptools-scm/releases
(In reply to John Hein from comment #4) I actually did diff 10 vs 9 and notice the "improvement. https://github.com/RonnyPfannschmidt/setuptools_scm/commit/c35b53ac0dcbd0528521886612540ac6478509ee is exactly my patch. Coincidence. I think we can apply this extra patch unconditionally until 10 lands in ports tree.
Created attachment 268465 [details] patched pyproject.toml to not require tomli <= 2.0.2 (for <py311) [v2] (In reply to Michael Osipov from comment #5) Agreed. nitpick: The upstream patch is slightly different than yours (>=1 vs >1). Pointless difference in practice. The upstream commit will not apply cleanly to 9.2.2 because there is an incompatible context change on the line above. In addition to some other context conflicts, setuptools 77.0.3 is now required instead of >=61. The upstream patch will apply cleanly to 10.0.0 (does not have the tomli fix). That, however, opens a different can of worms for FreeBSD with its very old setuptools still in place. This is v2 of the patch (vs bug 28677, comment 14) - very slightly different.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0e25377b0267b96599cf2f02ad3da9cb4ba87cc3 commit 0e25377b0267b96599cf2f02ad3da9cb4ba87cc3 Author: John Hein <jcfyecrayz@liamekaens.com> AuthorDate: 2026-03-01 22:05:17 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-03-02 08:48:26 +0000 devel/py-setuptools-scm: Fix build with Python 3.10 and py-tomli Make this port build and run with an newer version of py-tomli by backporting an upstream patch. Co-authored-by: Michael Osipov <michaelo@FreeBSD.org> PR: 293530 PR: 286779 Obtained from: https://github.com/RonnyPfannschmidt/setuptools_scm/commit/c35b53ac0dcbd0528521886612540ac6478509ee .../files/patch-pyproject.toml (new) | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+)
This has not been committed upstream. Youse were looking at an individual developer's copy of the repository and not the "source of truth" so to speak. The associated pull request has not been merged as of this writing. I'll allow it this time but please do better due diligence next time (if there is one), and actually give python@ a chance to review rather than rushing through.
(In reply to Charlie Li from comment #8) Point taken!