Closed shreekarSS closed 2 years ago
I have a question: How do we handle version specified not in by the [project] section, but provided by the build backend ? I'm thinking specifically of setup like:
[project]
dynamic = ["version"]
[tool.setuptools-scm]
enabled = true
or
[project]
dynamic = ["version"]
[tool.setuptools.dynamic]
version = {attr = "thoth.document_sync.__version__"}
(I'm not sure it's possible in a general way, but in that case we might want to state that in the docs)
/hold
That is a valid point, we should check/address if the version is not in the project section.
https://github.com/python-poetry/poetry/issues/144
An interesting thread about why "version" should never be put in source code and should instead be derived from package metadata when needed.
The basic argument here is that version should be set from package metadata, not the other way around.
I'm not sure what this should mean for this PR, just a rabbit hole that I fell down when looking into Max's concern.
One way to just fix the issue raised is to recognize that json if version
is a dictionary then it won't hold a proper string and to return early. If it is specified in a different file then the version manager should update it automatically already so throwing an exception would be wrong in this case.
I believe we are addressing the required pattern with PR. we are only updating the pyproject.toml version if it is the project section, or else it wouldn't be picked for updated. and we are describing this in our docs as well.
I believe we are addressing the required pattern with PR. we are only updating the pyproject.toml version if it is the project section, or else it wouldn't be picked for updated. and we are describing this in our docs as well.
Oh yeah, I see what you mean
/test pre-commit
/retest
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: KPostOffice
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Signed-off-by: Shreekara sshreeka@redhat.com
Related Issues and Dependencies
Fixes: https://github.com/thoth-station/kebechet/issues/1158
…