Skip to content

Commit db7322e

Browse files
unamedkrclaude
andcommitted
pypi: pin setuptools<77 to dodge PEP 639 license validation crash
Real root cause of the macOS/Windows wheel failures (Linux x86_64 escaped via different Python images): setuptools 77.0+ canonicalizes the license expression in pyproject.toml via packaging.licenses, which requires packaging>=24.2 IN THE BUILD ENVIRONMENT. cibuildwheel's isolated build envs (especially cp39) don't pull that in by default, so they hit: ImportError: Cannot import `packaging.licenses`. Setuptools>=77.0.0 requires "packaging>=24.2" to work properly. Two-part fix: - Pin setuptools<77 in build-system.requires - Also list packaging>=24.2 explicitly so future setuptools upgrades don't reintroduce the issue Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5f0c2e8 commit db7322e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bindings/python/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[build-system]
2-
requires = ["setuptools>=64", "wheel"]
2+
# setuptools 77+ enforces PEP 639 license validation which requires
3+
# packaging>=24.2 in the build env — older Python builds in cibuildwheel
4+
# don't have it. Pin <77 until we migrate fully to PEP 639.
5+
requires = ["setuptools>=64,<77", "wheel", "packaging>=24.2"]
36
build-backend = "setuptools.build_meta"
47

58
[project]

0 commit comments

Comments
 (0)