Skip to main content

Automatically set package version using git tag/hash

Project description

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

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

setuptools-git-ver-1.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

setuptools_git_ver-1.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file setuptools-git-ver-1.0.1.tar.gz.

File metadata

  • Download URL: setuptools-git-ver-1.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using 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.8.0

File hashes

Hashes for setuptools-git-ver-1.0.1.tar.gz
Algorithm Hash digest
SHA256 edba9a6cccc59512d5fd6e413f6ee8e7851faefa819abc6500a6e02c84f41fb3
MD5 0afb40369be925b9a6c71ede51140a70
BLAKE2b-256 cc4f791b54ac80996dc8bbca06b01ece12fa6fb49cbce21173b30929036a6375

See more details on using hashes here.

File details

Details for the file setuptools_git_ver-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: setuptools_git_ver-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using 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.8.0

File hashes

Hashes for setuptools_git_ver-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 125a53e787865b61127b8f60c61c5ea284f8f686407b856c3cd89569485b09b7
MD5 97892c6e3cdbf358b89e8961be9039dd
BLAKE2b-256 7c219256403afa5171eea49c93c6a7cffa95519862032b15f18bd20d0298d72e

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