ITADN

rookiepy source build fails with uv 0.11+: pyproject.toml missing dynamic = ["version"]

#105Opendeeplook 创建于 2026-05-03
D
deeplookcommented
## Summary All released versions of `rookiepy` fail to install from source with uv 0.11+. uv enforces strict PEP 621 validation before invoking the build backend, and the `pyproject.toml` uses `[project]` without declaring `version` or adding it to `dynamic`. ## Error ``` × Failed to download and build `rookiepy==0.5.6` ├─▶ Failed to parse: `.../src/pyproject.toml` ╰─▶ TOML parse error at line 5, column 1 | 5 | [project] | ^^^^^^^^^ `pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the `project.dynamic` list ``` ## Affected versions All released versions (tested 0.5.4, 0.5.5, 0.5.6). The `main` branch has the same issue. ## Root cause `pyproject.toml` declares `[project]` but omits both `version` and `dynamic = ["version"]`. Maturin infers the version from `Cargo.toml` at build time, so the package builds fine with older tooling. uv 0.11 added strict PEP 621 validation that runs *before* calling the build backend, so it rejects the file without ever reaching maturin. ## Fix Add one line to `pyproject.toml`: ```toml [project] name = "rookiepy" dynamic = ["version"] # ← add this ``` ## Notes - This also means there are no pre-built wheels for Python 3.13 or 3.14 (related: #53), so source builds are the only option for users on newer Python versions — making this fix a prerequisite for them. - `pip` and older uv versions are more lenient and do not hit this error.
0 条评论