Repository navigation
feat: infer targets from uv required environments - #150
Merged
patrickballard merged 4 commits intoNov 10, 2026
Merged
Conversation
…to defaults (wheelgap#150) - uv accepts required-environments as a string or a list; a string was an error. - The inferred-targets note is now hidden with -q, like the other notes. - Markers that select no native target (a mobile-only project, or a package check run in such a folder) fall back to the default targets with a note instead of failing the run. - README and CHANGELOG say plainly that inferred targets replace the defaults. - No blank line inside the Unreleased list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
|
Merged, thanks @Swarneil1905! You turned the request into a PR within ten minutes of asking, and the tests are thorough: Python selection from every source, precedence, and the glibc/musl note all pinned down. It's also the first issue to go through our new assignment rule, which was your idea. We made a few changes before merging:
For your next one, #84 (version ranges: pick the newest release that supports each target's Python) is a help wanted issue with no PR yet. It's in the same targets-and-Pythons territory you know well now. (Review assisted by Claude.) |
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.
Closes #71
What this changes
Uses
[tool.uv] required-environmentsto infer default targets fromNATIVE_PLATFORMS, evaluating markers with the existingmarker_holdshelper and the selected Python versions.Target precedence remains
-t, then--dockerfile, then[tool.wheelgap] targets, followed by uv’s required environments and the built-in defaults. Inferred targets are explained on stderr. Linux markers include both glibc and musl targets because environment markers cannot distinguish them.Absent or empty settings retain the built-in defaults. Invalid settings or markers matching no supported native target produce an input error. With multiple Python versions, matching platforms are combined and checked across the selected versions.
Adds 34 offline tests covering marker combinations, Python selection, precedence, validation, and output handling, plus README documentation.
environments, mobile, and Pyodide inference remain outside this change.Validated on Windows with Python 3.13.14: 666 tests passed, 1 skipped. Ruff formatting, lint, mypy, and
git diff --checkpassed.AI tools used: OpenAI Codex assisted with implementation, tests, documentation, and review. I reviewed the changes and ran the validation commands locally.
Checklist
fake_pypi, without network accessuv run --group dev ruff format .anduv run --group dev ruff check .passuv run --group dev mypyanduv run --group dev pytestpassCHANGELOG.mdentry under## Unreleasedwith PR feat: infer targets from uv required environments #150- will add once the PR number is available, as requested inAGENTS.md