Skip to content

Adopt setuptools_scm for aligning releases with GitHub tags #55

Description

@ns-rse

setuptools_scm can be used to handle versioning and with an
appropriate GitHub Action and configuration of an account can make releases align on GitHub and PyPI.

pySPM uses poetry though, fortunately there is a
poetry-setuptools-csm-plugin that we can leverage to
integrate which ignores the version listed under tool.poerty.version and instead obtains it dynamically from the Git
Tag.

Required actions

According to the documentation for
poetry-setuptools-csm-plugin only a single change is required...

  • Add [tool.setuptools_scm].
  • [Optional] Remove [tool.poetry.version] as it would be ignored.
  • Addition of appropriate GitHub Action/workflow (see here).

Possible problems

  • As noted on the plugin page this may be contrary to the Poetry team philosophy.
  • It would require @scholi to setup GitHub as a Trusted publisher

Advantages

  • Releases could be made by tagging a commit here on GitHub (or when a local tag is pushed).
  • PyPI and GitHub releases would be aligned.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions