Skip to content

python-platform docs and uv.toml schema doesn't match command requirements #12590

Closed
@falkben

Description

@falkben

Summary

When using python-platform there's a mismatch between the behavior of the uv command, using the uv.toml config, and what's in the help menu and the online docs.

The help menu says to use the underscore between x86 and 64 (uv pip compile --help):

--python-platform <PYTHON_PLATFORM>
    The platform for which requirements should be resolved [possible values: windows, linux, macos, x86_64-pc-windows-msvc,
    i686-pc-windows-msvc, x86_64-unknown-linux-gnu, aarch64-apple-darwin, x86_64-apple-darwin, aarch64-unknown-linux-gnu,
    aarch64-unknown-linux-musl, x86_64-unknown-linux-musl, x86_64-manylinux2014, x86_64-manylinux_2_17,
    x86_64-manylinux_2_28, x86_64-manylinux_2_31, x86_64-manylinux_2_32, x86_64-manylinux_2_33, x86_64-manylinux_2_34,
    x86_64-manylinux_2_35, x86_64-manylinux_2_36, x86_64-manylinux_2_37, x86_64-manylinux_2_38, x86_64-manylinux_2_39,
    x86_64-manylinux_2_40, aarch64-manylinux2014, aarch64-manylinux_2_17, aarch64-manylinux_2_28, aarch64-manylinux_2_31,
    aarch64-manylinux_2_32, aarch64-manylinux_2_33, aarch64-manylinux_2_34, aarch64-manylinux_2_35, aarch64-manylinux_2_36,
    aarch64-manylinux_2_37, aarch64-manylinux_2_38, aarch64-manylinux_2_39, aarch64-manylinux_2_40]```

And when run from the command line, that works:

```sh
uv pip compile --python-platform=x86_64-unknown-linux-gnu --quiet setup.py -o requirements.txt

However, if used in the uv.toml I get an error:

[pip]
python-platform = "x86_64-unknown-linux-gnu"
error: Failed to parse: `uv.toml`
  Caused by: TOML parse error at line 4, column 19
  |
4 | python-platform = "x86_64-unknown-linux-gnu"
  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
unknown variant `x86_64-unknown-linux-gnu`, expected one of `windows`, `linux`, `macos`, `x8664-pc-windows-msvc`, `i686-pc-windows-msvc`, `x8664-unknown-linux-gnu`, `aarch64-apple-darwin`, `x8664-apple-darwin`, `aarch64-unknown-linux-gnu`, `aarch64-unknown-linux-musl`, `x8664-unknown-linux-musl`, `x8664-manylinux2014`, `x8664-manylinux217`, `x8664-manylinux228`, `x8664-manylinux231`, `x8664-manylinux232`, `x8664-manylinux233`, `x8664-manylinux234`, `x8664-manylinux235`, `x8664-manylinux236`, `x8664-manylinux237`, `x8664-manylinux238`, `x8664-manylinux239`, `x8664-manylinux240`, `aarch64-manylinux2014`, `aarch64-manylinux217`, `aarch64-manylinux228`, `aarch64-manylinux231`, `aarch64-manylinux232`, `aarch64-manylinux233`, `aarch64-manylinux234`, `aarch64-manylinux235`, `aarch64-manylinux236`, `aarch64-manylinux237`, `aarch64-manylinux238`, `aarch64-manylinux239`, `aarch64-manylinux240`

When using uv.toml I have to omit the underscore between x86 and 64. x8664-unknown-linux-gnu

Is this expected or a bug?

Platform

Darwin 24.3.0 arm64

Version

uv 0.6.11 (0632e24 2025-03-30)

Python version

Python 3.12.3

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions