Skip to main content

Automatically set package version using git tags.

Project description

another-setuptools-git-version

PackageVersion PythonVersion Stable Format License

Automatically set package version from Git. This is a re-release of [bad-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.0',
    ...
)

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

setup(
    name='foobar',
    version_config={
        "version_format": "{tag}.{cc}",
        "starting_version": "0.1.0"
    },
    setup_requires=['bad-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.

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

another-setuptools-git-version-0.1.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file another-setuptools-git-version-0.1.2.tar.gz.

File metadata

  • Download URL: another-setuptools-git-version-0.1.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.6.11

File hashes

Hashes for another-setuptools-git-version-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e934e7bc94224283482eb00a9cfd627830689a623fcb2400cfe44c824c875c08
MD5 cd044cff57204908538117868efcd838
BLAKE2b-256 4412d4d93179af04775ac8be6ff3528ef6bd7be43847f00094a0f1a7be7f575a

See more details on using hashes here.

File details

Details for the file another_setuptools_git_version-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: another_setuptools_git_version-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.6.11

File hashes

Hashes for another_setuptools_git_version-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c8df233fc4d54588482f1751932032e220a4a511c143cec851de89dec05b6387
MD5 23d638fa3c7eec7766e7cd1399df7947
BLAKE2b-256 f1813d82e7c0817bd703896bc5782a0be49f82d9dbded141e9ef0a1e39834556

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page