Skip to content

Commit 708b60d

Browse files
committed
Use automated versioning with versioningit
1 parent 1c9e979 commit 708b60d

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

.github/release_checklist.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ Release checklist
22
- [ ] Check outstanding issues on JIRA and Github.
33
- [ ] Check [latest documentation](https://python-zlib-ng.readthedocs.io/en/latest/) looks fine.
44
- [ ] Create a release branch.
5-
- [ ] Set version to a stable number.
65
- [ ] Change current development version in `CHANGELOG.rst` to stable version.
7-
- [ ] Change the version in `__init__.py`
86
- [ ] Merge the release branch into `main`.
97
- [ ] Created an annotated tag with the stable version number. Include changes
108
from CHANGELOG.rst.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
src/zlib_ng/_version.py
2+
13
# Byte-compiled / optimized / DLL files
24
__pycache__/
35
*.py[cod]

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=51", "wheel"]
2+
requires = ["setuptools>=64", "versioningit>=1.1.0"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.versioningit.vcs]
6+
method="git"
7+
default-tag = "v0.0.0"
8+
9+
[tool.versioningit.write]
10+
file = "src/zlib_ng/_version.py"

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
from setuptools import Extension, find_packages, setup
1717
from setuptools.command.build_ext import build_ext
1818

19+
import versioningit
20+
1921
ZLIB_NG_SOURCE = os.path.join("src", "zlib_ng", "zlib-ng")
2022

2123
SYSTEM_IS_UNIX = (sys.platform.startswith("linux") or
@@ -124,7 +126,7 @@ def build_zlib_ng():
124126

125127
setup(
126128
name="zlib-ng",
127-
version="0.5.0-dev",
129+
version=versioningit.get_version(),
128130
description="Drop-in replacement for zlib and gzip modules using zlib-ng",
129131
author="Leiden University Medical Center",
130132
author_email="r.h.p.vorderman@lumc.nl", # A placeholder for now

src/zlib_ng/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# This file is part of python-zlib-ng which is distributed under the
66
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.
77

8-
__version__ = "0.5.0-dev"
8+
from ._version import __version__

src/zlib_ng/_version.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2+
# 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
3+
# Python Software Foundation; All Rights Reserved
4+
5+
# This file is part of python-zlib-ng which is distributed under the
6+
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.
7+
8+
__version__: int

0 commit comments

Comments
 (0)