Skip to main content

setuptools-git-ver

PyPI version Build Status

Automatically set package version using git tag/hash

Install

Install using pip

Usage

To just use the default templates for versioning:

setuptools.setup(
    ...
    version_config=True,
    ...
    setup_requires=['setuptools-git-ver'],
    ...
)

Changing templates (also shows the defaults):

setuptools.setup(
    ...
    version_config={
        "template": "{tag}",
        "dev_template": "{tag}.dev{ccount}+git.{sha}"
        "dirty_template": "{tag}.dev{ccount}+git.{sha}.dirty"
    },
    ...
    setup_requires=['setuptools-git-ver'],
    ...
)

Templates

  • template: used if no untracked files and latest commit is tagged

  • dev_template: used if no untracked files and latest commit isn't tagged

  • dirty_template: used if untracked files exist or uncommitted changes have been made

Format Options

  • {tag}: Latest tag in the repository

  • {ccount}: Number of commits since last tag

  • {sha}: First 8 characters of the sha hash of the latest commit

Release files for setuptools-git-ver 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for setuptools-git-ver 1.0.4
File Size Uploaded
setuptools-git-ver-1.0.4.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for setuptools-git-ver 1.0.4
File Interpreter ABI Platform
setuptools_git_ver-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / setuptools-git-ver-1.0.4.tar.gz

Download URL setuptools-git-ver-1.0.4.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
07b57167e9fc2359850195f76a230de2440fc92245351c523865690e70395a08
BLAKE2b-256 checksum
How to use checksums
ce23480a76b81a65e1c68429d59904d7a1fde44969d71a7ee896711e2d4a6f56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release files / setuptools_git_ver-1.0.4-py3-none-any.whl

Download URL setuptools_git_ver-1.0.4-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d26b7d060cd0f7cfe156aceed43070d1766ac130928ae2ec79d14e88c14b7db0
BLAKE2b-256 checksum
How to use checksums
d7f4a82e50268e9ef672d10adbef55d5229256f1cb4d74e699f9ee4117b430dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page