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

does not look at src/ folder

Open rbuckland opened this issue 2 years ago • 3 comments

We have the alternative standard layout of a src folder

pyproject.toml
src/module_thing/__init__.py

this plugin is trying to read

pyproject.toml
module_thing/__init__.py

rbuckland avatar Nov 13 '23 14:11 rbuckland

yes. Defining a prefix where to search for the package base folder would be really useful. Using "src/<packagename>" is some kind of standard because in larger projects you need some data beside the package itself.

Eg, having a kind of "prefix" as configure option would be very helpul, eg.,

[tool.poetry-version-plugin]
source = "init"
search="backend"

or

[tool.poetry-version-plugin]
source = "init"
search="src"

would improve the usability of this nice plugin a lot.

Messinger avatar Nov 22 '23 09:11 Messinger

I think for best compatibility, this could be inferred from the "packages" config from field, eg

packages = [{include = "mypackage", from = "src"}]

Instead of adding special configuration for the plugin

I think this is effectively a duplicate of #19 and #43 and is fixed by https://github.com/tiangolo/poetry-version-plugin/pull/20/commits/51416e488d4802ee4e6a51cd095e62fb8523e094 , but not merged?

brookpatten avatar Dec 06 '23 20:12 brookpatten

I think for best compatibility, this could be inferred from the "packages" config from field, eg

packages = [{include = "mypackage", from = "src"}]

It still does not work this way :/

kzych-inpost avatar Jun 24 '24 11:06 kzych-inpost