Skip to content

automatic version à la python-versioneer #284

@glehmann

Description

@glehmann

We are using https://github.com/warner/python-versioneer to version our tools, and it's been working very well so far. Now we are looking into using poetry, but would like to keep a versioneer like behavior that doesn't seem to be possible at this time.

Basically, versioneer automatically generates the package version number based on the current git commits and tags of the package repository. It uses the information from git describe to generate the version, and apply a few changes to it to be compatible with python versioning scheme and include some useful info.

For example, in our repository, we have:

> git describe
v0.11.0-136-g2f043654
> mytool --version
0.11.0+136.g2f043654.dirty

and python setup.py sdist generates a package called mytool-0.11.0+136.g2f043654.dirty.tar.gz.

Any chance we can make that happen in poetry?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions