hatch-vcs
| CI/CD | |
| Package | |
| Meta |
This provides a plugin for Hatch that uses your preferred version control system (like Git) to determine project versions.
Table of Contents
Global dependency
Ensure hatch-vcs is defined within the build-system.requires field in your pyproject.toml file.
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
Version source
The version source plugin name is vcs.
-
pyproject.toml
[tool.hatch.version] source = "vcs"
-
hatch.toml
[version] source = "vcs"
Version source options
| Option | Type | Default | Description |
|---|---|---|---|
tag-pattern |
str |
see code | A regular expression used to extract the version part from VCS tags. The pattern needs to contain either a single match group, or a group named version, that captures the actual version information. |
fallback-version |
str |
The version that will be used if no other method for detecting the version is successful. If not specified, unsuccessful version detection will raise an error. | |
raw-options |
dict |
A table of setuptools-scm parameters that will override any of the options listed above. The write_to and write_to_template parameters are ignored. |
Build hook
The build hook plugin name is vcs.
-
pyproject.toml
[tool.hatch.build.hooks.vcs] -
hatch.toml
[build.hooks.vcs]
Build hook options
| Option | Type | Default | Description |
|---|---|---|---|
version-file |
str |
REQUIRED | The relative path to the file that gets updated with the current version. |
template |
str |
The template used to overwrite the version-file. See the code for the default template for each file extension. |
License
hatch-vcs is distributed under the terms of the MIT license.
Metadata
Release files for hatch-vcs 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hatch_vcs-0.2.0.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hatch_vcs-0.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 15.4 kB
Release files / hatch_vcs-0.2.0.tar.gz
| Download URL | hatch_vcs-0.2.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff
|
|
BLAKE2b-256 checksum How to use checksums |
ac13b3d83564c0cc0f1d45b4ea2a78b87b383a8165797613fedf11f1a7e49b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Release files / hatch_vcs-0.2.0-py2.py3-none-any.whl
| Download URL | hatch_vcs-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
86432a0dd49acae0e69e14f285667693fcd31d9869ca21634520acc30d482f07
|
|
BLAKE2b-256 checksum How to use checksums |
7d4773ff0d30c4fa8b175db04a104a55dbe7d2050632262575efe02b8e2c8e2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|