poetry-version-plugin icon indicating copy to clipboard operation
poetry-version-plugin copied to clipboard

`__init__.py` detection does not assume the existence of `from` specification of packages

Open TatsuyaShirakawa opened this issue 3 years ago • 3 comments

If the project is organized like

root
   |- src
   |     |- my_package
   |- pyproject.toml

and pyproject.toml is like

[tool.poetry]
...
packages = [
    { include = "my_package" from = "src" }
]
...
[tool.poetry-version-plugin]
source = "init"

then, the detection of __init__.py fails.

It is because, I think, the __init__.py detection logic here does not consider the from value.

TatsuyaShirakawa avatar Nov 10 '21 03:11 TatsuyaShirakawa

Same for me.

jessekrubin avatar Jan 20 '22 07:01 jessekrubin

Fixed with #20 :slightly_smiling_face:

dekoza avatar Feb 02 '22 17:02 dekoza

@tiangolo : If possible for you, would be great to incorporate PR https://github.com/tiangolo/poetry-version-plugin/pull/20. I'd love to use this plugin but because I use the src structure, the current release version doesn't work for me :/.

setu4993 avatar Aug 18 '23 07:08 setu4993