Skip to main content

A Poetry plugin that integrates setuptools-scm

Project description

A Poetry plugin that integrates setuptools-scm to console

PyPI Downloads

Updates pyproject.toml file version with a calculated one

Versions are calculated taking into account the distance between current commit and last tagged one, and current commit revision hash

Supported schemes are the main ones exposed by setuptools-scm:

scm: formats according to setuptools_scm get_version default behavior. e.g. 0.1.dev1+g1e0ede4
date: formats current date and distance, e.g. 2025.4.1.1.dev1+g9d4edec . Scheme used is calver_by_date function
branch: Use branch based versioning of library. Scheme used is release_branch_semver_version function

Prerequisites of projects using this plugin:

  • A [tool.setuptools_scm] section declared
  • A git tag with your starting version if different from default one is recommended

examples:

poetry version-calculate

Ouputs something like 1.0.1.dev1+g1e0ede4

poetry version-calculate date

2025.4.1.1.dev1+g1e0ede4

Note about date format:

Two digits year is taken by default, you can change this behaviour making a previous git tag with a different supporten format, in this case for example

git tag 2025.4.1

Set default format

You can configure default format by adding the following entry (the example sets date format)

[tool.poetry-setuptools-scm-support]
default-format = "date"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry_setuptools_scm_support-0.5.9.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_setuptools_scm_support-0.5.9-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file poetry_setuptools_scm_support-0.5.9.tar.gz.

File metadata

  • Download URL: poetry_setuptools_scm_support-0.5.9.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-65-generic

File hashes

Hashes for poetry_setuptools_scm_support-0.5.9.tar.gz
Algorithm Hash digest
SHA256 fa901cd72141993b25c763f4a6629b2499b4d420a3b8a568f318c7758cf49d26
MD5 7ab1bd372c6d12c7d06e201fd8be8738
BLAKE2b-256 81bf678ba224600533bc61d9008a527c8e65d88ffae8a5c03317b82d27840861

See more details on using hashes here.

File details

Details for the file poetry_setuptools_scm_support-0.5.9-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_setuptools_scm_support-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0cce62cd4f7833d0215845ac9f69b407de6414bd176543e48148a2c571060b4c
MD5 51b6f68137517e1be83d6d3eb543a9cc
BLAKE2b-256 04235b648decb8bb268f3765ce0e91f7f36edb40988189a15bda31f625d344ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page