Setuptools Gitver
Simple Git version plugin for setuptools.
Usage
Modify the setup.py of your project and add setuptools-gitver to setup_requires and add keyword argument gitver=True. Then, after each release, add .post+gitver suffix to the version string.
For example, in setup.py:
import setuptools
if __name__ == '__main__':
setuptools.setup(
name='example-package',
version='1.2.3.post+gitver',
setup_requires=['setuptools-gitver'],
gitver=True,
)
This will then generate version numbers like 1.2.3.post0.dev7+ga1b2c3d where 7 is the number of commits since the v1.2.3 tag and a1b2c3d is commit id of the HEAD.
When creating a release, update the version and remove the post+gitver suffix. When there is no +gitver suffix, the version won’t be touched by Setuptools Gitver. Also remember to tag the release in Git with git tag -a v1.2.3.
Metadata
Release files for setuptools-gitver 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| setuptools-gitver-1.1.0.tar.gz | 2.6 kB | Without provenance | Details for setuptools-gitver-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| setuptools_gitver-1.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for setuptools_gitver-1.1.0-py2.py3-none-any.whl |
Total release size: 8.2 kB
Release files / setuptools-gitver-1.1.0.tar.gz
| Download URL | setuptools-gitver-1.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0daa2b63b2765570ad3beb404c037d2883c2a2dd1b4d6f1dd82063b73bf9b17d
|
|
BLAKE2b-256 checksum How to use checksums |
546f1b8061a3e2192c20df52affe7d2caeb352550ef297250aed76bcbcb4e4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / setuptools_gitver-1.1.0-py2.py3-none-any.whl
| Download URL | setuptools_gitver-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2f831c4164574c1c64173fddc2037ba1fbab54d9055ac57cd488c38c0c47c9cd
|
|
BLAKE2b-256 checksum How to use checksums |
dfe317801e9324d5fe259b4b61977bda7a3f8a27844fb8b726fe083d0517a2e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for setuptools-gitver 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.