Skip to main content

Simple semantic version management for Python projects

Project description

WL Version Manager

A simple Python package for managing semantic versions in Python projects.

Features

  • Automatic version bumping (patch, minor, major)
  • Updates both VERSION file and setup.py
  • Command-line interface
  • Python API for programmatic use
  • Follows semantic versioning (major.minor.patch)

Installation

pip install wl_wl_version_manager

Usage

Command Line

# Initialize version file
wl_version_manager init

# Show current version
wl_version_manager current

# Bump versions
wl_version_manager patch   # 1.0.0 -> 1.0.1
wl_version_manager minor   # 1.0.1 -> 1.1.0
wl_version_manager major   # 1.1.0 -> 2.0.0

# Set specific version
wl_version_manager set 1.2.3

Python API

from wl_version_manager import VersionManager

vm = VersionManager()

# Read current version
current = vm.read_version()

# Bump versions
new_version = vm.bump_patch()
new_version = vm.bump_minor()
new_version = vm.bump_major()

# Set specific version
vm.set_version("2.1.0")

Integration with Makefile

build:
	wl_version_manager patch
	python setup.py sdist

File Structure

The tool expects:

  • VERSION file containing current version
  • setup.py with version= line to update

Options

wl_version_manager --version-file custom_version.txt --setup-file custom_setup.py current

License

BSD 3-Clause License

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

wl_version_manager-0.1.19.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file wl_version_manager-0.1.19.tar.gz.

File metadata

  • Download URL: wl_version_manager-0.1.19.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for wl_version_manager-0.1.19.tar.gz
Algorithm Hash digest
SHA256 f4129f2d12cd9490c884fb2f8b448563dcd2d7bcb14e4711b82001afca73244b
MD5 17c3ccbe93f8f396f6dd1ee37048ab1a
BLAKE2b-256 e99c8133cadbef98da8530ac7161c82842a9ee8fb0a0d5e924a563e301004d5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page