Skip to content

Commit 0066218

Browse files
committed
fix: include template files in package installation
codemcp/templates/ contains data files that aren't Python files per se, but they need to be installed properly so that they're available to be copied when we run codemcp init. Fix pyproject.toml so that we correctly include the data files. I think I want to recursively glob everything that isn't excluded by .gitignore, but if it's best practice to directly only package things that are Git versioned that would work too (not sure how you gonna do source tarballs that way though.) ```git-revs 3f886df (Base revision) d77a938 Add Hatchling configuration to include template files in package build HEAD Auto-commit format changes ``` codemcp-id: 253-fix-include-template-files-in-package-installation ghstack-source-id: 8d5e37f Pull-Request-resolved: #242
1 parent 0af947a commit 0066218

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

codemcp/agno.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ async def serve_playground_app_async(
6262

6363

6464
async def main():
65-
async with MCPTools(
66-
f"{sys.executable()} -m codemcp.hot_reload_entry"
67-
) as codemcp:
65+
async with MCPTools(f"{sys.executable()} -m codemcp.hot_reload_entry") as codemcp:
6866
# TODO: cli-ify the model
6967
agent = Agent(
7068
model=Claude(id="claude-3-7-sonnet-20250219"),

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ codemcp-multi = "codemcp.multi_entry:main"
4343
requires = ["hatchling"]
4444
build-backend = "hatchling.build"
4545

46+
[tool.hatch.build.targets.wheel]
47+
packages = ["codemcp"]
48+
49+
[tool.hatch.build.targets.sdist]
50+
include = [
51+
"/codemcp",
52+
"/README.md",
53+
"pyproject.toml",
54+
]
55+
56+
[tool.hatch.build.force-include]
57+
"codemcp/templates" = "codemcp/templates"
58+
4659
[tool.uv]
4760

4861
[tool.ruff]

0 commit comments

Comments
 (0)