Skip to content

Commit 51b5c85

Browse files
committed
feat: add subpackage support and update version file path
- Introduces `subpackage` field in copier.yaml with help text and default value - Updates version file path in pyproject.toml.jinja to use subpackage - Renames template source directories from `{{ name }}` to `{{ subpackage }}`
1 parent a5b4442 commit 51b5c85

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

copier.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,10 @@ name:
7272

7373
package:
7474
type: str
75-
help: TODO
75+
help: "package (example: liblaf)"
76+
default: "{{ name }}"
77+
78+
subpackage:
79+
type: str
80+
help: "sub-package (example: liblaf/grapes)"
7681
default: "{{ name }}"

template/pyproject.toml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ branch = true
6060
source = ["src/"]
6161

6262
[tool.hatch.build.hooks.vcs]
63-
version-file = "src/{{ package }}/_version.py"
63+
version-file = "src/{{ subpackage }}/_version.py"
6464

6565
[tool.hatch.build.targets.sdist]
6666
only-include = ["src/"]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)