From 745f1a28d41e016dcb7650e8622dbbb0cb93987b Mon Sep 17 00:00:00 2001 From: Manoj Bajaj Date: Tue, 9 Jun 2026 13:15:21 +0530 Subject: [PATCH 1/2] fix: bundle static UI assets into wheel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hatchling respects .gitignore by default, so the generated src/authsome/ui/web/* assets were excluded from the wheel even though build-ui.sh populates them before uv build runs in CI. - Add force-include for the wheel target (sdist already had this) with the correct installed path (authsome/ui/web, not src/authsome/ui/web) - Remove .gitkeep — build-ui.sh's mkdir -p creates the directory; no placeholder needed - Drop the .gitignore exception for .gitkeep Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 3 +-- pyproject.toml | 3 +++ scripts/build-ui.sh | 1 - src/authsome/ui/web/.gitkeep | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 src/authsome/ui/web/.gitkeep diff --git a/.gitignore b/.gitignore index 1fc1db07..ad5be38d 100644 --- a/.gitignore +++ b/.gitignore @@ -206,9 +206,8 @@ cython_debug/ # Ruff stuff: .ruff_cache/ -# Generated static dashboard bundle +# Generated static dashboard bundle — run scripts/build-ui.sh before uv build src/authsome/ui/web/* -!src/authsome/ui/web/.gitkeep # PyPI configuration file .pypirc diff --git a/pyproject.toml b/pyproject.toml index 9fe24b07..d989796a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,9 @@ authsome = "authsome.cli.main:cli" [tool.hatch.build.targets.wheel] packages = ["src/authsome"] +[tool.hatch.build.targets.wheel.force-include] +"src/authsome/ui/web" = "authsome/ui/web" + [tool.hatch.build.targets.sdist.force-include] "src/authsome/ui/web" = "src/authsome/ui/web" diff --git a/scripts/build-ui.sh b/scripts/build-ui.sh index 4b106982..37acb217 100755 --- a/scripts/build-ui.sh +++ b/scripts/build-ui.sh @@ -12,4 +12,3 @@ UV_BIN="${UV:-uv}" rm -rf "${TARGET_DIR}" mkdir -p "${TARGET_DIR}" cp -R "${UI_DIR}/out/." "${TARGET_DIR}/" -printf '%s\n' "Generated static UI assets are copied here by scripts/build-ui.sh." > "${TARGET_DIR}/.gitkeep" diff --git a/src/authsome/ui/web/.gitkeep b/src/authsome/ui/web/.gitkeep deleted file mode 100644 index 196661a7..00000000 --- a/src/authsome/ui/web/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -Generated static UI assets are copied here by scripts/build-ui.sh. From f345a189bf5db5252487fa4101487dc7a3935a1e Mon Sep 17 00:00:00 2001 From: Manoj Bajaj Date: Tue, 9 Jun 2026 13:36:17 +0530 Subject: [PATCH 2/2] fix: use artifacts instead of force-include for wheel UI assets force-include errors during editable installs (uv pip install -e) when src/authsome/ui/web doesn't exist on a fresh checkout, breaking lint and test CI jobs. artifacts bypasses .gitignore for matched files but silently skips missing paths, so editable installs succeed without requiring build-ui.sh to have run first. Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d989796a..a7ec111b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,9 +64,7 @@ authsome = "authsome.cli.main:cli" [tool.hatch.build.targets.wheel] packages = ["src/authsome"] - -[tool.hatch.build.targets.wheel.force-include] -"src/authsome/ui/web" = "authsome/ui/web" +artifacts = ["src/authsome/ui/web/**"] [tool.hatch.build.targets.sdist.force-include] "src/authsome/ui/web" = "src/authsome/ui/web"