Skip to content

Commit f7d2353

Browse files
authored
fix(poly info): for Poetry with PEP-621 support (#440)
* fix(poly info): for Poetry with PEP-621 support * bump Hatch hook to 1.5.6 * bump PDM bricks hook to 1.3.9 * bump PDM workspace hook to 1.3.9 * bump Poetry plugin to 1.51.3 * bump CLI to 1.45.3
1 parent 586c6c2 commit f7d2353

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

components/polylith/toml/core.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def collect_configured_pdm_exclude_patterns(data: dict) -> set:
7777

7878

7979
def collect_configured_poetry_exclude_patterns(data: dict) -> set:
80-
exclude = data["tool"]["poetry"].get("exclude", [])
80+
exclude = data.get("tool", {}).get("poetry", {}).get("exclude", [])
8181

8282
return set(exclude)
8383

@@ -111,8 +111,12 @@ def collect_configured_exclude_patterns(
111111
return set()
112112

113113

114+
def is_poetry_without_pep_621_support(data) -> bool:
115+
return repo.is_poetry(data) and not repo.is_pep_621_ready(data)
116+
117+
114118
def get_project_package_includes(namespace: str, data) -> List[dict]:
115-
if repo.is_poetry(data):
119+
if is_poetry_without_pep_621_support(data):
116120
return data["tool"]["poetry"].get("packages", [])
117121

118122
includes = (
@@ -172,10 +176,6 @@ def get_pep_621_optional_dependencies(data) -> List[str]:
172176
return sum(matrix, [])
173177

174178

175-
def is_poetry_without_pep_621_support(data) -> bool:
176-
return repo.is_poetry(data) and not repo.is_pep_621_ready(data)
177-
178-
179179
def parse_project_dependencies(data) -> dict:
180180
if is_poetry_without_pep_621_support(data):
181181
deps = data["tool"]["poetry"].get("dependencies", {})

projects/hatch_polylith_bricks/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 = "hatch-polylith-bricks"
3-
version = "1.5.5"
3+
version = "1.5.6"
44
description = "Hatch build hook plugin for Polylith"
55
authors = ['David Vujic']
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

projects/pdm_polylith_bricks/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 = "pdm-polylith-bricks"
3-
version = "1.3.8"
3+
version = "1.3.9"
44
description = "a PDM build hook for Polylith"
55
authors = ["David Vujic"]
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

projects/pdm_polylith_workspace/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 = "pdm-polylith-workspace"
3-
version = "1.3.8"
3+
version = "1.3.9"
44
description = "a PDM build hook for a Polylith workspace"
55
homepage = "https://davidvujic.github.io/python-polylith-docs/"
66
repository = "https://github.com/davidvujic/python-polylith"

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.51.2"
3+
version = "1.51.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.45.2"
3+
version = "1.45.3"
44
description = "Python tooling support for the Polylith Architecture"
55
authors = ['David Vujic']
66
homepage = "https://davidvujic.github.io/python-polylith-docs/"

0 commit comments

Comments
 (0)