Skip to content

Commit 6be1473

Browse files
authored
fix: add missing hatch target in project template (#386)
* fix: add missing build target packages entry in hatchling project template (i.e. applicable for uv and hatch) * bump Poetry plugin to 1.42.3 * bump CLI to 1.35.2
1 parent c44e882 commit 6be1473

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

components/polylith/project/create.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pathlib import Path
22

33
import tomlkit
4-
from polylith import repo
4+
from polylith import configuration, repo
55
from polylith.dirs import create_dir
66
from polylith.repo import projects_dir
77

@@ -21,13 +21,16 @@ def create_project(path: Path, template: str, name: str, description: str) -> No
2121
description_field = f'description = "{description}"' if description else ""
2222
authors_field = f"authors = {authors}" if authors else ""
2323

24+
namespace = configuration.get_namespace_from_config(path)
25+
2426
project_toml = create_project_toml(
2527
template,
2628
{
2729
"name": name,
2830
"description": description_field,
2931
"authors": authors_field,
3032
"python_version": python_version,
33+
"namespace": namespace,
3134
},
3235
)
3336

components/polylith/project/get.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
5858
dependencies = []
5959
60+
[tool.hatch.build.targets.wheel]
61+
packages = ["{namespace}"]
62+
6063
[tool.hatch.build.hooks.polylith-bricks]
6164
6265
[tool.polylith.bricks]

projects/poetry_polylith_plugin/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "poetry-polylith-plugin"
3-
version = "1.42.1"
3+
version = "1.42.3"
44
description = "A Poetry plugin that adds tooling support for the Polylith Architecture"
55
authors = ["David Vujic"]
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

projects/polylith_cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polylith-cli"
3-
version = "1.35.1"
3+
version = "1.35.2"
44
description = "Python tooling support for the Polylith Architecture"
55
authors = ['David Vujic']
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

test/components/polylith/project/test_templates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"description": "",
1212
"authors": "",
1313
"python_version": "3.12",
14+
"namespace": "unit_test",
1415
}
1516

1617

0 commit comments

Comments
 (0)