diff --git a/components/polylith/project/templates.py b/components/polylith/project/templates.py index dadd2611..d66598e6 100644 --- a/components/polylith/project/templates.py +++ b/components/polylith/project/templates.py @@ -17,7 +17,7 @@ """ hatch_pyproject = """\ -build-system] +[build-system] requires = ["hatchling"] build-backend = "hatchling.build" diff --git a/components/polylith/repo/get.py b/components/polylith/repo/get.py index 83182cb6..55287455 100644 --- a/components/polylith/repo/get.py +++ b/components/polylith/repo/get.py @@ -15,11 +15,11 @@ def get_metadata_section(data: dict) -> dict: return data["project"] if is_pep_621_ready(data) else data["tool"]["poetry"] -def get_authors(path: Path) -> list: +def get_authors(path: Path) -> str: data = get_pyproject_data(path) section = get_metadata_section(data) - return section.get("authors", []) + return section.get("authors", []).as_string() def get_python_version(path: Path) -> str: diff --git a/projects/hatch_polylith_bricks/pyproject.toml b/projects/hatch_polylith_bricks/pyproject.toml index 639e2b3c..baedc552 100644 --- a/projects/hatch_polylith_bricks/pyproject.toml +++ b/projects/hatch_polylith_bricks/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "hatch-polylith-bricks" -version = "1.0.0" +version = "1.0.1" description = "Hatch build hook plugin for Polylith" authors = ['David Vujic'] homepage = "https://davidvujic.github.io/python-polylith-docs/" diff --git a/projects/poetry_polylith_plugin/pyproject.toml b/projects/poetry_polylith_plugin/pyproject.toml index 35e96845..a88de0cc 100644 --- a/projects/poetry_polylith_plugin/pyproject.toml +++ b/projects/poetry_polylith_plugin/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "poetry-polylith-plugin" -version = "1.14.5" +version = "1.14.6" description = "A Poetry plugin that adds tooling support for the Polylith Architecture" authors = ["David Vujic"] homepage = "https://davidvujic.github.io/python-polylith-docs/" diff --git a/projects/polylith_cli/pyproject.toml b/projects/polylith_cli/pyproject.toml index 897d6736..51e4cbdf 100644 --- a/projects/polylith_cli/pyproject.toml +++ b/projects/polylith_cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "polylith-cli" -version = "1.0.0" +version = "1.0.1" description = "Python tooling support for the Polylith Architecture" authors = ['David Vujic'] homepage = "https://davidvujic.github.io/python-polylith-docs/" diff --git a/test/components/polylith/repo/test_repo_get.py b/test/components/polylith/repo/test_repo_get.py index e0d650a6..d87c6109 100644 --- a/test/components/polylith/repo/test_repo_get.py +++ b/test/components/polylith/repo/test_repo_get.py @@ -48,7 +48,7 @@ def test_get_metadata_section(): def test_get_authors_for_poetry_toml(monkeypatch): - expected = ["Unit Test"] + expected = '["Unit Test"]' data = poetry_toml.format(authors=expected) monkeypatch.setattr(repo.get, "get_pyproject_data", lambda _: tomlkit.loads(data)) @@ -62,7 +62,7 @@ def test_get_authors_for_pep_621_compliant_toml(monkeypatch): monkeypatch.setattr(repo.get, "get_pyproject_data", lambda _: tomlkit.loads(data)) - assert repo.get.get_authors(path) == [{"name": "Unit Test", "email": "the-email"}] + assert repo.get.get_authors(path) == authors def test_get_python_version_for_poetry_toml(monkeypatch):