Skip to main content

A tool to bump the version in setup.py in python projects

Project description

Bump-Setup

@readwithai - X - blog - machine-aided reading - 📖⚡️🖋️

A command-line tool to bump the version in-place in setup.py or pyproject.yaml for python projects. It can bump major, minor or patch versions.

Motivaiton

I got bored of bumping versions but hand so made this tool.

Alternatives and prior work

There is a tool called bumpversion which is quite similar but wants to take the files that get modified and also seems to want you to specify the file.

Installation

You can install bump-setup using pipx:

pip install bump-setup

Usage

To bump the version in setup.py, run the following command:

bump-setup <major|minor|patch>

Examples

bump-setup major  # Increments the major version
bump-setup minor  # Increments the minor version
bump-setup patch  # Increments the patch version

Attribution

This uses the python tree-sitter and tree-sitter-python libraries to modify and parse source code while leaving whitespace intact. I did some vibe coding because I am lazy. I'm not sure it helped much since I then had to fix a bunch of bugs by hand!

About me

I am @readwithai. I create tools for reading, research and agency sometimes using the markdown editor Obsidian.

I also create a stream of tools that are related to carrying out my work. There are various python tools here.

I write about lots of things - including tools like this - on X. My blog is more about reading and research and agency.

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

bump_setup-1.1.0.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file bump_setup-1.1.0.tar.gz.

File metadata

  • Download URL: bump_setup-1.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for bump_setup-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9a2f64e86b96f6c5d98a817968d0772a1ff31311d9a9e0e616f97b40cf85e933
MD5 5ee8816e8b0425a49efab154ffeb365b
BLAKE2b-256 b4a81c96c09cc593ed67470c5e11166ec344859f9057f1b98f78471e76f903d9

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