fix(build): correct module-name type in pyproject.toml files#2358
Open
60ke wants to merge 1 commit into
Open
Conversation
The module-name field in [tool.uv.build-backend] should be a string for single-module projects, not a list. This is a regression bug: - Commit b75c997 (2025-11-17) fixed this issue by changing module-name = ["kimi_cli"] to module-name = "kimi_cli" - Commit d2dfc94 (chore(dep): move kaos package to separate repo) accidentally reverted this fix back to the list syntax The incorrect list syntax causes uv run to fail with: TOML parse error: invalid type: sequence, expected a string According to uv documentation, single-module projects should use string format, while list format is only for namespace packages with multiple root modules. Affected files: - pyproject.toml (kimi_cli) - packages/kaos/pyproject.toml (kaos) - packages/kimi-code/pyproject.toml (kimi_code) - packages/kosong/pyproject.toml (kosong) - sdks/kimi-sdk/pyproject.toml (kimi_sdk)
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.
Summary
The
module-namefield in[tool.uv.build-backend]should use string syntax for these single-module packages.Regression History
This is a regression for the root package configuration:
b75c9973(2025-11-17) fixed the rootpyproject.tomlby changingmodule-name = ["kimi_cli"]tomodule-name = "kimi_cli".d2dfc94c(chore(dep): move kaos package to separate repo) later changed the root configuration back tomodule-name = ["kimi_cli"]while removingkaosfrom the same list.The workspace package files have the same invalid single-module list syntax, so this PR corrects all affected
uv_buildpackage configs together.Problem
The incorrect list syntax causes
uv runto fail with:Root Cause
According to the uv build backend settings documentation:
module-name = "sklearn".module-name = ["foo", "bar"], is for namespace packages with multiple modules.These packages each expose a single root module, so they should use string format.
Changes
pyproject.tomlmodule-name = ["kimi_cli"]module-name = "kimi_cli"packages/kaos/pyproject.tomlmodule-name = ["kaos"]module-name = "kaos"packages/kimi-code/pyproject.tomlmodule-name = ["kimi_code"]module-name = "kimi_code"packages/kosong/pyproject.tomlmodule-name = ["kosong"]module-name = "kosong"sdks/kimi-sdk/pyproject.tomlmodule-name = ["kimi_sdk"]module-name = "kimi_sdk"Test Plan
uv run python -c "print('works')"uv syncuv build