Skip to content

Commit

Permalink
fix(hatch): the project toml template (#164)
Browse files Browse the repository at this point in the history
* fix(hatch): the project toml template need to include the build hook table to be activated

* bump Plugin version to 1.14.8

* bump CLI version to 1.1.1
  • Loading branch information
DavidVujic authored Jan 30, 2024
1 parent 7d8ccc2 commit d835402
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions components/polylith/project/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
dependencies = []
[tool.hatch.build.hooks.polylith-bricks]
[tool.polylith.bricks]
"""

Expand Down
2 changes: 1 addition & 1 deletion projects/poetry_polylith_plugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry-polylith-plugin"
version = "1.14.7"
version = "1.14.8"
description = "A Poetry plugin that adds tooling support for the Polylith Architecture"
authors = ["David Vujic"]
homepage = "https://davidvujic.github.io/python-polylith-docs/"
Expand Down
2 changes: 1 addition & 1 deletion projects/polylith_cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "polylith-cli"
version = "1.1.0"
version = "1.1.1"
description = "Python tooling support for the Polylith Architecture"
authors = ['David Vujic']
homepage = "https://davidvujic.github.io/python-polylith-docs/"
Expand Down
3 changes: 3 additions & 0 deletions test/components/polylith/project/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ def test_poetry_template():
def test_hatch_template():
data = tomlkit.loads(templates.hatch_pyproject.format(**template_data))

assert "hatch-polylith-bricks" in data["build-system"]["requires"]
assert data["tool"]["hatch"]["build"]["hooks"]["polylith-bricks"] == {}
assert data["tool"]["polylith"]["bricks"] == {}


def test_pdm_template():
data = tomlkit.loads(templates.pdm_pyproject.format(**template_data))

assert "pdm-polylith-bricks" in data["build-system"]["requires"]
assert data["tool"]["polylith"]["bricks"] == {}

0 comments on commit d835402

Please sign in to comment.