Automatically set package version using git tags.
Project description
better-setuptools-git-version
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file better-setuptools-git-version-1.0.5.tar.gz.
File metadata
- Download URL: better-setuptools-git-version-1.0.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e0d70cbd3287d3fbe8696057f3c870d937fd9fbdd4a57d1a15796553b17d387
|
|
| MD5 |
093aa4303be8cc2907fffebdc0880f63
|
|
| BLAKE2b-256 |
5c19e574c327e6f6f2d89d4112bb45a476dcb3c5753af0ec63a2a657c24ec86a
|
File details
Details for the file better_setuptools_git_version-1.0.5-py2.py3-none-any.whl.
File metadata
- Download URL: better_setuptools_git_version-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecd893fe8c0936664171a9f4b2221c3e23a028bc792dd10e979a09f77baebfde
|
|
| MD5 |
e8dd4b22e40a0479fbc4fca456f36653
|
|
| BLAKE2b-256 |
5c657fcc51592de23cc66ff6e5b3ad2a307421a6e3fe6070a7a8124e52029d1d
|