Skip to content

Commit

Permalink
Python 2 adjustments command internals (#74)
Browse files Browse the repository at this point in the history
* fix(build): set the Poetry instance based on if the Poetry Command internals exist

* bump version to 1.8.2
  • Loading branch information
DavidVujic authored Jan 6, 2025
1 parent f7fd5c6 commit 07b7a9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion poetry_multiproject_plugin/commands/buildproject/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ def rewrite_modules(self, project_path: Path, top_ns: str) -> None:
def prepare_for_build(self, path: Path):
project_poetry = Factory().create_poetry(path)

self.set_poetry(project_poetry)
if hasattr(self, "set_poetry"):
self.set_poetry(project_poetry)
elif hasattr(self, "_poetry"):
self._poetry = project_poetry
else:
raise ValueError("Cannot find expected Poetry Command internals.")

def handle(self):
path = self.poetry.file.path.absolute()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry-multiproject-plugin"
version = "1.8.1"
version = "1.8.2"
description = "A Poetry plugin that makes it possible to use relative package includes."
authors = ["David Vujic"]
license = "MIT"
Expand Down

0 comments on commit 07b7a9d

Please sign in to comment.