Skip to content

Support for VCS tag-based dynamic versioning during build #1318

@mikenerone

Description

@mikenerone

Question

Does python-semantic-release support build plugin packages that implement dynamic package versioning for the build based on an up-to-date VCS release tag?

Additional context

A common use case for dynamic package build metadata is to derive the version directly from VCS tags. There are many build backends and plugins that provide this functionality for a variety of project/dependency/build managers (setuptools, uv, PDM, Poetry, hatch/hatchling, flit all come to mind). What they all have in common is that they derive from the most recent release tag, so if you want the resulting build to be version 1.2.3, that v1.2.3 tag needs to be applied to the current commit before the build runs.

It seems like this is not currently supported by PSR, because the docs seem to indicate that PSR always tags after the build. Because this is part of the metadata-in-pyproject.toml standard, though (and has been since its inception in PEP 621), I strongly suspect this is either a documentation issue or a me issue. :P

Note: if it's not currently supported, I'm happy to create a new feature request.

References

  1. Dynamic metadata as described in the Python Packaging User Guide
  2. Dynamic metadata as described in the original PEP for package metadata in pyproject.toml, PEP 621

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedPrevent from becoming stalefeatureA new feature or a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions