fix: raise clear errors when no wheel is produced#2909
Open
henryiii wants to merge 1 commit into
Open
Conversation
Addresses items 1-4 of pypa#2908: - Add errors.BuildProducedNoWheelError (exit code 10) for when a build frontend exits successfully without producing a wheel. - Guard built-wheel globs on linux, macos, windows, ios, and pyodide so they raise BuildProducedNoWheelError instead of bare IndexError / StopIteration. (android already guards this via glob1.) - Wrap pyodide's repaired-wheel glob in try/except StopIteration to raise RepairStepProducedNoWheelError, matching macos/windows. - Replace android.py env-parsing asserts with errors.FatalError including the unexpected token. - Raise errors.FatalError with the missing macOS identifier when ios.py cannot find a matching macOS configuration, instead of IndexError. Assisted-by: ClaudeCode:claude-fable-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
This addresses items 1-4 of #2908, replacing several bare tracebacks with clear
FatalErrors when a build does not produce a wheel or platform resources are inconsistent.Changes:
errors.BuildProducedNoWheelError(exit code 10) for the case where a build frontend exits successfully but produces no wheel.BuildProducedNoWheelErrorinstead of a bareIndexError/StopIteration. (Android already handled this via itsglob1helper.)try/except StopIterationto raiseRepairStepProducedNoWheelError, matching the existing macOS/Windows pattern.assertstatements that validateandroid.py envoutput witherrors.FatalError, including the unexpected token in the message.errors.FatalErrornaming the missing macOS identifier whenios.pycannot find a matching macOS configuration, instead of anIndexError.Part of #2908
🤖 Generated with Claude Code