Skip to content

Commit b7ccc77

Browse files
committed
refactor: add hatch-vcs to default Hatch plugins
1 parent 2872efd commit b7ccc77

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

changelog.d/+58caa45b.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add hatch-vcs to default Hatch plugins.

copier.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ hatch_plugins:
129129
type: str
130130
help: Which Hatch plugins do you want to use?
131131
multiselect: true
132-
default: []
132+
default: [hatch-vcs]
133133
when: "{{ build_backend == 'hatch' }}"
134134
choices:
135135
hatch-vcs: hatch-vcs
136136

137137
dynamic_version:
138138
type: bool
139139
help: Whether the version is dynamic.
140-
default: "{{ 'hatch-vcs' in hatch_plugins }}"
140+
default: "{{ build_backend == 'hatch' and 'hatch-vcs' in hatch_plugins }}"
141141
when: false
142142

143143
entry_points:

template/pyproject.toml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ release = [
117117
"uv>=0.7.7",
118118
{%- endif %}
119119
]
120-
{% if hatch_plugins %}
120+
{% if build_backend == 'hatch' and hatch_plugins %}
121121
[tool.hatch]
122122
{%- if 'hatch-vcs' in hatch_plugins %}
123123
build.hooks.vcs.version-file = "src/{{ package_name }}/VERSION.txt"

0 commit comments

Comments
 (0)