Skip to content

Commit b518315

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 0066218 Auto-commit format changes HEAD Replace force-include with pattern-based include for template files ``` codemcp-id: 253-fix-include-template-files-in-package-installation ghstack-source-id: 5ad7eed Pull-Request-resolved: #242
1 parent 3cb3a7d commit b518315

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ 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+
include = ["codemcp/templates/**/*"]
49+
50+
[tool.hatch.build.targets.sdist]
51+
include = [
52+
"/codemcp/**/*",
53+
"/README.md",
54+
"pyproject.toml",
55+
]
56+
4657
[tool.uv]
4758

4859
[tool.ruff]

0 commit comments

Comments
 (0)