Commit 46a3938
Fix pyproject.toml for templates without Python package directories
When templates have no Python package directory (include_python=no AND no
jobs/pipelines, OR lakeflow_only=yes), hatch cannot automatically detect
what to build. This causes 'uv run pytest' to fail with build errors:
"Unable to determine which files to ship inside the wheel using the
following heuristics: <https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection>"
Add conditional [tool.hatch.build.targets.wheel] configuration with
packages = ["src"] when $has_python_package_dir is false. This matches the
same logic used in __preamble.tmpl to determine directory structure.
The fix applies to:
- default-minimal template (no sample code)
- lakeflow-pipelines templates (SQL-only, no Python packages)
This ensures 'uv run pytest' works correctly in all template variants.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent f7fc738 commit 46a3938
File tree
4 files changed
+19
-1
lines changed- acceptance/bundle/templates
- default-minimal/output/my_default_minimal
- lakeflow-pipelines
- python/output/my_lakeflow_pipelines
- sql/output/my_lakeflow_pipelines
- libs/template/templates/default/template/{{.project_name}}
4 files changed
+19
-1
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
0 commit comments