py_version_from_tag
py_version_from_tag is a simple CLI tool that will obtain the tag name of the current commit, extract version from it and write it to python setup file.
This can be very useful in automatic build processes, so you don't need to manually update version string in setup files when you have already written it as a tag name.
Usage
Prerequisites:
- Your working directory should be placed on a valid git repository
- The current commit (HEAD) should be tagged
python -m pip install py_version_from_tag
python -m py_version_from_tag -p {path to pyproject.toml}
Alternatively, if the current commit is not tagged, but you want to use the latest commit as version, you can use the -l switch, like this:
python -m py_version_from_tag -l
For full list of available options, run
python -m py_version_from_tag -h
Notes
- Currently, only pyproject.toml file is supported as a setup file
- Tag name should contain a valid version information, for example: "v3.1.2", "1.2.3", "v4.5.6_alpha" are all examples of valid tag version names
Metadata
Release files for py-version-from-tag 1.2.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 |
|---|---|---|---|---|
| py_version_from_tag-1.2.0.tar.gz | 14.8 kB | Without provenance | Details for py_version_from_tag-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_version_from_tag-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for py_version_from_tag-1.2.0-py3-none-any.whl |
Total release size: 19.9 kB
Release files / py_version_from_tag-1.2.0.tar.gz
| Download URL | py_version_from_tag-1.2.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31c29080587225ec15f5fc21962c78b2cfdbb08ba05e3dd99735e414a2abfd17
|
|
BLAKE2b-256 checksum How to use checksums |
ecec9c173a266b11e56cd9c2d5aaf192b4ab07a818a58c13bb09ff50a486c5cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / py_version_from_tag-1.2.0-py3-none-any.whl
| Download URL | py_version_from_tag-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ec0aeb87965af39123ec75db1c42dfa23f818d1fe25684099f45563a77b9977
|
|
BLAKE2b-256 checksum How to use checksums |
9e96e77d82920e7ae4e8d7b207525bcce29f760c43af3ca2e029bb20a323c442
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Security for py-version-from-tag 1.2.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.