Skip to content

fix: don't error when a global build-frontend is set on pyodide - #2945

Merged
henryiii merged 1 commit into
pypa:mainfrom
henryiii:fix/pyodide-frontend-warning
Jul 23, 2026
Merged

henryiii merged 1 commit into
pypa:mainfrom
henryiii:fix/pyodide-frontend-warning

Conversation

@henryiii

@henryiii henryiii commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

This would cause many valid configuration files to break. Making this just a warning for now, maybe pip/uv could become an error in a future version. Maybe build / build[uv] could always just tap over with a warning.

I'd expect this will only matter if we introduce a new xbuild option eventually.

Currently blocking a patch release.

馃 AI text below 馃

Since #2609, the pyodide platform requires the pyodide-build build frontend. But a global build-frontend setting (in TOML or CIBW_BUILD_FRONTEND) overrides the platform default in the option cascade, so previously-working configs like a global build-frontend = "build" now fail with a ConfigurationError unless a pyodide-specific override is added. Even build-frontend = "default" failed, since "default" was hard-mapped to "build" before the check.

This resolves "default" to the platform default (pyodide-build on pyodide), and turns the mismatch error into a warning that uses pyodide-build instead (keeping any frontend args). That matches pre-#2609 behavior, where pyodide always ran pyodide build and the frontend name only affected verbosity flags.

Regression tests were added first and confirmed to fail without the fix.

Since pypa#2609, the pyodide platform required the 'pyodide-build' frontend,
but a global build-frontend setting (TOML or CIBW_BUILD_FRONTEND)
overrides the platform default, so previously-working configs like
build-frontend = "build" failed with a ConfigurationError. Even
"default" failed, since it was mapped to "build" before the check.

Resolve "default" to the platform default, and warn and use
pyodide-build when another frontend is set on pyodide, matching
pre-pypa#2609 behavior where the frontend name only affected verbosity
flags.

Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii
henryiii requested a review from agriyakhetarpal July 22, 2026 20:00

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @henryiii, makes sense and sorry for the trouble! Glad we caught this before a release.

@henryiii
henryiii merged commit b7cac6d into pypa:main Jul 23, 2026
45 checks passed
@henryiii
henryiii deleted the fix/pyodide-frontend-warning branch July 23, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants