Skip to content

Commit b6e4a24

Browse files
committed
Read the package version dynamically from the VERSION file
hatchling sources the version from the VERSION file, so a single edit to that file propagates to the package, the man page, and the docs.
1 parent 49a6bc8 commit b6e4a24

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.1
1+
2.0.2

bitmath.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: bitmath
33
.\" Author: [see the "AUTHOR" section]
44
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5-
.\" Date: 05/04/2026
5+
.\" Date: 05/05/2026
66
.\" Manual: python-bitmath
7-
.\" Source: bitmath 2.0.1
7+
.\" Source: bitmath 2.0.2
88
.\" Language: English
99
.\"
10-
.TH "BITMATH" "1" "05/04/2026" "bitmath 2\&.0\&.1" "python\-bitmath"
10+
.TH "BITMATH" "1" "05/05/2026" "bitmath 2\&.0\&.2" "python\-bitmath"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "bitmath"
7-
version = "2.0.1"
7+
dynamic = ["version"]
88
description = "Pythonic module for representing and manipulating file sizes with different prefix notations (file size unit conversion)"
99
readme = "README.rst"
1010
requires-python = ">=3.9"
@@ -78,6 +78,10 @@ exclude = [
7878
[tool.hatch.build.targets.wheel]
7979
packages = ["bitmath"]
8080

81+
[tool.hatch.version]
82+
path = "VERSION"
83+
pattern = '(?P<version>.+)'
84+
8185
[tool.hatch.publish.index]
8286
disable = true
8387

0 commit comments

Comments
 (0)