Skip to main content

A Poetry plugin that integrates setuptools-scm

Project description

A Poetry plugin that integrates setuptools_scm https://pypi.org/project/setuptools-scm/ to console

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

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.6.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for poetry_setuptools_scm_support-0.5.6.2.tar.gz
Algorithm Hash digest
SHA256 afeaa5ffd9084ebce07c0e7708f91002161c7d7793f9774e1df0c50d2c46ab2f
MD5 44c5a2af0d0c90a7837ddfacaa934f12
BLAKE2b-256 ea19633e14463ce166dff26c8ab00b0ea99ec52132d2bcae0235bfb0d550e423

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for poetry_setuptools_scm_support-0.5.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 268a1f7af9a5cbdfc77bbe81db09ef9d78b821d4690908488598d389406073bf
MD5 3ba91420ce54350ad3790660d1827981
BLAKE2b-256 0e3d0ab40fbbc1d8c06c5dfec4ceb007439f3f9176c1f636617dd28b6d465ec5

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