🧙 version-wizard
The version wizard extracts version information from a git tag and includes it in your python package so you don’t have to worry about commit messages like Bump version to 0.8.1 anymore. Here’s how to use the wizard:
Install by running
pip install version-wizard.Add
include VERSIONto yourMANIFEST.infile (or create one by runningecho "include VERSION" > MANIFEST.in).Update your
setup.pyas shown below.Push semantic versioning tags to your GitHub branch, e.g,
0.8.1.
# setup.py
from setuptools import setup, ...
from version_wizard import from_github_tag
setup(
version=from_github_tag(),
...
)
Behind the scenes
The call to from_github_tag will do one of two things:
If the
VERSIONfile exists, it simply returns its contents. This is the typical behavior when your installing the package from pypi, for example.If the
VERSIONfile does not exist, it will try to extract the version from theGITHUB_REFenvironment variable and write it to theVERSIONfile.
Because the MANIFEST.in includes VERSION, the VERSION file will be included in any distribution, e.g., when you run python setup.py sdist. The correct version is thus automatically packaged with your distribution elminiating any possible inconsistencies.
Interface
..automodule:: version_wizard
:members:
Metadata
Release files for version-wizard 0.1.2
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 |
|---|---|---|---|---|
| version-wizard-0.1.2.tar.gz | 3.9 kB | Without provenance | Details for version-wizard-0.1.2.tar.gz |
Release files / version-wizard-0.1.2.tar.gz
| Download URL | version-wizard-0.1.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c060b50944ae87130648cf0b21f1869ef171fe69041c025b88ef493d248d2247
|
|
BLAKE2b-256 checksum How to use checksums |
f89eb4b11f1c9598bcee377ae0cea2b33d1fdd30be75fac8e256d3dd4c8b264e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for version-wizard 0.1.2
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.