Skip to content

Commit 684961f

Browse files
authored
fix hatchling backend (#58)
1 parent dbabda2 commit 684961f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ dev = [
4141
requires = ["hatchling"]
4242
build-backend = "hatchling.build"
4343

44-
{% if cookiecutter.layout == "flat" -%}
45-
[tool.setuptools]
46-
py-modules = ["{{cookiecutter.project_slug}}"]
44+
{% if cookiecutter.layout == "src" -%}
45+
[tool.hatch.build.targets.wheel]
46+
packages = ["src/{{cookiecutter.project_slug}}"]
47+
{%- else -%}
48+
[tool.hatch.build.targets.wheel]
49+
packages = ["{{cookiecutter.project_slug}}"]
4750
{%- endif %}
4851

4952
[tool.mypy]

0 commit comments

Comments
 (0)