Poetry requires version info in pyproject.toml when build tooling does this dynamically #10729
Replies: 1 comment
-
|
As far as I know, defining Historically, poetry-core was the only build-backend supported by Poetry - and poetry-core requires one of both versions to be defined in the pyproject.toml. Although, with Poetry 2.2, altnernative build-backends are supported by |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Opening this as a discussion initially since I'm not really sure if this is a bug, new feature, or just ambiguity in how pyproject.toml is defined.
I'm using poetry in a corporate environment and have no control over the build pipeline. The pipeline expects my pyproject.toml to contain both of these:
and then in the
__init__.pyof the package:(as far as I understand it from there the build system injects the version in that location as it builds the wheel but that's neither here nor there)
With this arrangement poetry gives the following error when I try to poetry lock
Now I could add either of those with a dummy version number and be done with it, but that seems less than ideal since this the whole point of this file is to have accurate metadata about the project. If I controlled the pipeline I imagine I could inject the version number into pyproject.toml as well, but I can't effect that change.
Has anyone else run into this, and if so what did you do?
Beta Was this translation helpful? Give feedback.
All reactions