Skip to content

Commit 2506b88

Browse files
committed
Swap build system
1 parent 2cb25e4 commit 2506b88

2 files changed

Lines changed: 25 additions & 36 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -58,44 +58,33 @@ jobs:
5858
- name: Run tests
5959
run: uv run just test
6060

61-
# Reproduce the Claude Desktop extension install flow.
62-
# Claude Desktop clones extensions into a fresh directory and runs
63-
# `uv pip install -e .` without an existing lockfile or venv.
64-
# The previous `uv sync` test passes because it copies the lockfile
65-
# and venv metadata. This step mimics the real user experience.
61+
- name: Build package
62+
run: uv build
63+
64+
# Simulate the Claude Desktop extension install flow.
65+
# manifest.json defines: "command": "uv", "args": ["run", "--directory", "${__dirname}", "mcp_massive"]
66+
# Claude Desktop clones extensions into a path with spaces
67+
# (AppData/Roaming/Claude/Claude Extensions/<id>) and runs that command.
68+
# This test clones into a fresh directory (no .venv or uv.lock) with
69+
# spaces in the path and runs the exact same command.
6670
- name: Simulate Claude Desktop extension install
6771
shell: pwsh
6872
run: |
6973
$extPath = "$env:RUNNER_TEMP\Claude Extensions\mcp-massive"
70-
New-Item -ItemType Directory -Path $extPath -Force
71-
# Copy only source files — no .venv, uv.lock, or cached state
7274
git clone . $extPath
73-
cd $extPath
74-
# Fresh editable install like Claude Desktop does — no lockfile
75-
uv venv
76-
uv pip install -e .
77-
78-
# Test `uv run --directory` invocation — how MCP clients typically
79-
# launch servers configured in claude_desktop_config.json
80-
- name: Test MCP client-style invocation
81-
shell: pwsh
82-
run: |
83-
$extPath = "$env:RUNNER_TEMP\Claude Extensions\mcp-massive"
84-
$proc = Start-Process -NoNewWindow -PassThru -FilePath uv `
85-
-ArgumentList "run", "--directory", $extPath, "mcp_massive", "--transport", "stdio"
86-
Start-Sleep -Seconds 5
87-
if ($proc.HasExited -and $proc.ExitCode -ne 0) {
88-
Write-Error "Server exited with code $($proc.ExitCode)"
75+
# Run the exact command from manifest.json's mcp_config
76+
# uv run --directory <path> mcp_massive
77+
# This triggers a fresh build + install via the build backend,
78+
# then starts the server on stdio. We let it run briefly to
79+
# confirm it boots without errors.
80+
$proc = Start-Process -NoNewWindow -PassThru -RedirectStandardError "$env:RUNNER_TEMP\stderr.txt" `
81+
-FilePath uv -ArgumentList @("run", "--directory", "$extPath", "mcp_massive", "--transport", "stdio")
82+
Start-Sleep -Seconds 10
83+
$stderr = Get-Content "$env:RUNNER_TEMP\stderr.txt" -Raw -ErrorAction SilentlyContinue
84+
if ($stderr) { Write-Host "Server stderr:`n$stderr" }
85+
if ($proc.HasExited) {
86+
Write-Error "Server exited early with code $($proc.ExitCode)"
8987
exit 1
9088
}
91-
if (!$proc.HasExited) { Stop-Process -Id $proc.Id -Force }
92-
Write-Host "Server started successfully"
93-
94-
- name: Build package
95-
run: uv build
96-
97-
- name: Test install from built wheel
98-
shell: pwsh
99-
run: |
100-
$wheel = Get-ChildItem dist\*.whl | Select-Object -First 1
101-
uv run --no-project --with $wheel.FullName python -c "import mcp_massive; print('import ok')"
89+
Stop-Process -Id $proc.Id -Force
90+
Write-Host "Server started successfully via uv run --directory"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ name = "Massive"
2020
email = "support@massive.com"
2121

2222
[build-system]
23-
requires = [ "hatchling",]
24-
build-backend = "hatchling.build"
23+
requires = ["uv_build>=0.11.0,<0.12.0"]
24+
build-backend = "uv_build"
2525

2626
[dependency-groups]
2727
dev = [

0 commit comments

Comments
 (0)