https://github.com/laxertu/poetry-setuptools-scm-support
A Poetry plugin that integrates setuptools_scm
https://github.com/laxertu/poetry-setuptools-scm-support
poetry-plugins poetry-python setuptools-scm
Last synced: 2 months ago
JSON representation
A Poetry plugin that integrates setuptools_scm
- Host: GitHub
- URL: https://github.com/laxertu/poetry-setuptools-scm-support
- Owner: laxertu
- License: mit
- Created: 2025-02-09T17:57:43.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-04-01T07:51:15.000Z (3 months ago)
- Last Synced: 2025-04-01T08:39:45.055Z (3 months ago)
- Topics: poetry-plugins, poetry-python, setuptools-scm
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 functionPrerequisites of projects using this plugin:
* A [tool.setuptools_scm] section declared
* A git tag with your starting version if different from default one is recommendedexamples:
poetry version-calculate
Ouputs something like 1.0.1.dev1+g1e0ede4poetry 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"