diff --git a/pyproject_toml_builder.py b/pyproject_toml_builder.py index be1ecc2..3c524ce 100644 --- a/pyproject_toml_builder.py +++ b/pyproject_toml_builder.py @@ -247,7 +247,7 @@ def get_init_version(ppath: Path) -> tuple[Path, str | None]: else: raise Exception( f"'__version__' must be in the semantic version format: " - f"{Path(f.name).relative_to(self.root)}/ -> '{line.strip()}'" + f"{ppath.name}/__init__.py -> '{line.strip()}'" ) return Path(f.name), None