Skip to content

chore(release): sdist 自包含 web/dist(发布前打包修复)#4

Merged
GOSICK-Angel merged 1 commit into
mainfrom
chore/release-prep
Jun 2, 2026
Merged

chore(release): sdist 自包含 web/dist(发布前打包修复)#4
GOSICK-Angel merged 1 commit into
mainfrom
chore/release-prep

Conversation

@GOSICK-Angel

Copy link
Copy Markdown
Owner

背景

发布到 PyPI 前的打包修复。wheel 通过 force-include 注入 web/dist,但 sdist 默认仅含 VCS 跟踪文件,web/dist 被 gitignore,导致:

  • python -m build(sdist→wheel)报 FileNotFoundError: Forced include not found: web/dist
  • pip install --no-binary 源码安装拿不到 Web UI 资源

改动

  • pyproject.toml:为 [tool.hatch.build.targets.sdist.force-include] 增加 web/dist = web/dist,使 sdist 自包含。

验证

  • python -m build 同时产出 sdist + wheel,twine check 两者 PASSED
  • 全新 venv 安装 wheel 与 sdist:merge --help 正常、src/web/dist/index.html 运行时可解析
  • PyPI 名 code-merge-system 可用

🤖 Generated with Claude Code

wheel target 通过 force-include 注入 web/dist,但 sdist 默认仅含 VCS
跟踪文件,而 web/dist 被 gitignore,导致 sdist 缺失 Web UI 资源:
python -m build 的 sdist→wheel 流程报 FileNotFoundError,--no-binary
源码安装也拿不到 UI。为 sdist target 增加同名 force-include,使源码
分发自包含,无需安装期 Node 工具链。
@GOSICK-Angel GOSICK-Angel merged commit b259f6b into main Jun 2, 2026
3 of 5 checks passed
@GOSICK-Angel GOSICK-Angel deleted the chore/release-prep branch June 2, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant