Skip to main content

Automatically set package version using git tags.

Project description

better-setuptools-git-version

PackageVersion PythonVersion Stable Format License

Automatically set package version from Git. This is a re-release of very-good-setuptools-git-version with fixes and improvements, which is itself a re-release of setuptools-git-version

Introduction

Instead of hard-coding the package version in setup.py like:

setup(
    name='foobar',
    version='1.0',
    ...
)

this package allows to extract it from tags in the underlying Git repository:

setup(
    name='foobar',
    version_config={
        "version_format": "{tag}.dev{sha}",
        "starting_version": "0.1.0"
    },
    setup_requires=['better-setuptools-git-version'],
    ...
)

The tool uses the semantically-latest tag as the base version. If there are no annotated tags, the version specified by starting_version will be used. If HEAD is at the tag, the version will be the tag itself. If there are commits ahead of the tag, the first 8 characters of the sha of the HEAD commit will be included.

In all of the above cases, if the working tree is also dirty or contains untracked files, a +dirty suffix will be appended to the version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

File details

Details for the file even_better_setuptools_git_version-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: even_better_setuptools_git_version-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for even_better_setuptools_git_version-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4864d4bf6ba1a7b3de5955bb3c57bb36fc769f21e381765d9ab8594f72f86983
MD5 a162009cb5215ea53fcb0b978a0b23f2
BLAKE2b-256 ca70cfd4dc0656f4520dae15246d2661070ce74e505b941982f68c25df58d3be

See more details on using hashes here.

File details

Details for the file even_better_setuptools_git_version-1.0.7-py2-none-any.whl.

File metadata

  • Download URL: even_better_setuptools_git_version-1.0.7-py2-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for even_better_setuptools_git_version-1.0.7-py2-none-any.whl
Algorithm Hash digest
SHA256 e86bd22eaf1cd653e176b86cefa144fea922fa007c5326ce53ad79bc3ebce958
MD5 65f84b0f781d3b2f99b058cae262c4b9
BLAKE2b-256 c608a9c51ee4fe3c4e0da070570f89c90db54e57779494a82befb541d2af1523

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