You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use uv's environments settings to pick default targets #71
required-environments in particular is exactly "the platforms I ship to": uv will refuse to lock if a package has no wheel for one of them. wheelgap could use these as default targets when -t and [tool.wheelgap] targets aren't set, so a uv project gets the right check with no configuration.
What to do
Read [tool.uv] required-environments (and maybe environments) in cli.py next to load_config.
Map each marker expression to wheelgap targets. A good approach is to evaluate each one against every target's marker_env (see Target.marker_env in src/wheelgap/targets.py) and keep the targets where it's true.
Precedence: -t, then --dockerfile, then [tool.wheelgap], then [tool.uv], then the built-in defaults.
Note in the output where the targets came from, since this is implicit.
Tests with a few marker combinations.
Also worth a look: README "How it works" mentions environments-restricted lockfiles, which this would make smoother.
Read [tool.uv] required-environments only. Add a function next to load_config in src/wheelgap/cli.py that keeps the platforms in NATIVE_PLATFORMS (targets.py) where marker_holds(marker, target) (check.py) is true for any of the markers, using the run's Python. In main(), use it only when args.target or config.get("targets") is empty (that already covers -t, --dockerfile and [tool.wheelgap]), and print a note on stderr saying where the targets came from. Markers can't tell glibc from musl, so say how you treat musl-*.
Not in this PR: environments, mobile or Pyodide.
Tests in tests/test_cli.py with fake_pypi and a pyproject.toml in tmp_path: Linux only, platform_machine == 'aarch64', two markers, -t still winning, and a marker that matches no target.
Go for it, @Swarneil1905, and thanks for asking! Your request is what got us to start assigning issues, so this is the first one under the new rule.
I've assigned this to you. Assignments hold for 18 hours: open a PR (a draft is fine) by 21:30 UTC on 10 Nov to keep it. If there's no PR by then, the issue opens up again and the first PR to arrive is the one we merge. The "good first step" comment above has the file and function pointers to start from.
Activity
patrickballard commentedon Nov 9, 2026
A good first step
Read
[tool.uv] required-environmentsonly. Add a function next toload_configinsrc/wheelgap/cli.pythat keeps the platforms inNATIVE_PLATFORMS(targets.py) wheremarker_holds(marker, target)(check.py) is true for any of the markers, using the run's Python. Inmain(), use it only whenargs.target or config.get("targets")is empty (that already covers-t,--dockerfileand[tool.wheelgap]), and print a note on stderr saying where the targets came from. Markers can't tell glibc from musl, so say how you treatmusl-*.Not in this PR:
environments, mobile or Pyodide.Tests in
tests/test_cli.pywithfake_pypiand apyproject.tomlintmp_path: Linux only,platform_machine == 'aarch64', two markers,-tstill winning, and a marker that matches no target.(Reply assisted by Claude.)
Swarneil1905 commentedon Nov 10, 2026
Hi @patrickballard, I'd like to work on this issue. Could you assign it to me?
patrickballard commentedon Nov 10, 2026
Go for it, @Swarneil1905, and thanks for asking! Your request is what got us to start assigning issues, so this is the first one under the new rule.
I've assigned this to you. Assignments hold for 18 hours: open a PR (a draft is fine) by 21:30 UTC on 10 Nov to keep it. If there's no PR by then, the issue opens up again and the first PR to arrive is the one we merge. The "good first step" comment above has the file and function pointers to start from.
(Reply assisted by Claude.)
CONTRIBUTING: assign issues on request, held for 18 hours (#149)
Infer default targets from [tool.uv] required-environments (wheelgap#150