From e867d320c85713b1c9b0641c5f3139d94dfa81df Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 1 Jun 2026 22:22:03 -0400 Subject: [PATCH] =?UTF-8?q?chore(release):=20sdist=20=E8=87=AA=E5=8C=85?= =?UTF-8?q?=E5=90=AB=20web/dist=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=BA=90?= =?UTF-8?q?=E7=A0=81=E5=88=86=E5=8F=91=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 工具链。 --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6eca35f..2e095f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,6 +96,13 @@ packages = ["src"] [tool.hatch.build.targets.wheel.force-include] "web/dist" = "src/web/dist" +# The sdist is gitignore-driven and would otherwise drop the built Web UI +# (web/dist is gitignored). Force-include it so the source distribution is +# self-contained and `pip install` from sdist (or --no-binary) still ships +# the UI assets without requiring a Node toolchain at install time. +[tool.hatch.build.targets.sdist.force-include] +"web/dist" = "web/dist" + [tool.mypy] python_version = "3.11" strict = true