You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using python-symantic-release which is generating pre-release versions in the format "0.8.0-dev.2". When I run poetry version -s I get "0.8.0-dev.2" (i.e. literally the version that python-symantic-release added to pyproject.toml but when I run poetry build the version in the filenames is "canonicalized" i.e.
+ poetry build
Building my-project (0.8.0-dev.2)
- Building sdist
- Built my-project-0.8.0.dev2.tar.gz
- Building wheel
- Built my-project-0.8.0.dev2-py3-none-any.whl
I need to reference the file in my build script, so I need to be able to convert 0.8.0-dev.2 to 0.8.0.dev2 exactly as poetry does
Ideally poetry version would have a "canonical" option
Impact
This makes it easier to write custom build scripts and integrate with other tooling
I'd suggest making a pull request, either here or - probably better - at python-semantic-release.
From a poetry point of view this feels so niche that if I were you I wouldn't want to wait on someone else showing up who wanted this enough to do it - but also probably harmless enough that a pull request had a good chance of success.
However from an ecosystem point of view I'd think there is likely more value in having python-semantic-release generate canonical versions all along.
@dimbleby yeah I agree I do think python-semantic-release should have support for canonical versioning - I've raised it with them (as it also fails to parse canonical version tags, i..e "Couldn't parse tag v0.4.0.dev2 as as Version: '0.4.0.dev2' is not a valid Version") - it's possible I've missed a config somewhere. If not I'll see if I can convince them to change/accept a PR, if not I'll consider doing one here.
Issue Kind
Brand new capability
Description
I'm using
python-symantic-release
which is generating pre-release versions in the format "0.8.0-dev.2". When I runpoetry version -s
I get "0.8.0-dev.2" (i.e. literally the version thatpython-symantic-release
added topyproject.toml
but when I runpoetry build
the version in the filenames is "canonicalized" i.e.I need to reference the file in my build script, so I need to be able to convert
0.8.0-dev.2
to0.8.0.dev2
exactly as poetry doesIdeally
poetry version
would have a "canonical" optionImpact
This makes it easier to write custom build scripts and integrate with other tooling
Workarounds
I've written my own python script using https://pypi.org/project/packaging/
The text was updated successfully, but these errors were encountered: