Skip to content

Commit d280c6d

Browse files
mldangeloclaude
andcommitted
chore: optimize package contents for distribution
Configure hatchling to exclude unnecessary files from the source distribution (sdist). This reduces package size and ensures only essential files are distributed to users. Excluded from sdist: - .github/ - CI/CD workflows and GitHub-specific configs - tests/ - Test suite (not needed by end users) - CHANGELOG.md - Auto-generated, tracked in GitHub releases - AGENTS.md, CLAUDE.md - Developer documentation - release-please-config.json - Release automation config - .release-please-manifest.json - Release version tracking - renovate.json - Dependency update automation - uv.lock - Development lock file The wheel (binary) distribution already only includes the necessary Python code and is unchanged. Before: - sdist included ~15 files (tests, .github, configs, etc.) After: - sdist includes only 7 essential files (src/, LICENSE, README, pyproject.toml) - wheel unchanged (still optimal with just Python code) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 79fbc2a commit d280c6d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ Repository = "https://github.com/promptfoo/promptfoo-python"
4545
Homepage = "https://www.promptfoo.dev"
4646
Documentation = "https://www.promptfoo.dev/docs"
4747

48+
[tool.hatch.build.targets.sdist]
49+
exclude = [
50+
"/.github",
51+
"/.gitignore",
52+
"/.release-please-manifest.json",
53+
"/release-please-config.json",
54+
"/renovate.json",
55+
"/uv.lock",
56+
"/tests",
57+
"/CHANGELOG.md",
58+
"/AGENTS.md",
59+
"/CLAUDE.md",
60+
]
61+
62+
[tool.hatch.build.targets.wheel]
63+
packages = ["src/promptfoo"]
64+
4865
[tool.ruff]
4966
line-length = 120
5067
target-version = "py39"

0 commit comments

Comments
 (0)