Overwrite __version__ in a package's __init__.py with the version from pyproject.toml
Project description
verbake
A simple script that copies the value of version
from pyproject.toml
and uses it to overwrite the value of __version__
in a package's main __init__.py
.
This is for getting around the problem of needing to remember to manually version bump both pyproject.toml
and __init__.py
(for those packages that need the version in both places) every time you update your project.
This also helps avoid an error that occurs when testing your package in remote environments like GitHub Actions which is caused by dynamically setting __version__
using importlib.metadata
and other methods.
Install (PyPI)
pip install verbake
Usage
from verbake.baker import bake
bake()
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
File details
Details for the file verbake-1.0.1.tar.gz
.
File metadata
- Download URL: verbake-1.0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa14a3825e81687ac7bac249ab1f4371707ad1f4faeb050ae2e67758b2696d61 |
|
MD5 | 1f6104fbf385fb27c1fe262a3cb1918c |
|
BLAKE2b-256 | 1e28abe01aaea88e787e032180e3c0b4429b6f250e265c4d1f6abac6a94784f8 |
File details
Details for the file verbake-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: verbake-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a12ef7778a7d0ff15c2d93f8985be0e36b4694f2074cbe26b4956aaf6e012290 |
|
MD5 | 7fa9ff2d5381117270a6b348e849e9ef |
|
BLAKE2b-256 | 9b37ea1b13b6476c8cc72ae146017c1c8fe3651c4a7cb5d535123a73c3267fa5 |