Skip to content

Commit 5155ba7

Browse files
author
Jussi Kukkonen
committed
build: Single source version number
As of setuptools 46.4.0, one can accomplish single source version number with version = attr: package.__version__ in setup.cfg: As long as setuptools simplified AST parser is able to read the file, this works without actually importing anything. Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
1 parent 248dabd commit 5155ba7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build-system section
22
[build-system]
3-
requires = ["setuptools>=40.8.0", "wheel"]
3+
requires = ["setuptools>=46.4.0", "wheel"]
44
build-backend = "setuptools.build_meta"
55

66
# Black section

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = tuf
3-
version = 1.0.0
3+
version = attr: tuf.__version__
44
author = https://www.updateframework.com
55
author_email = theupdateframework@googlegroups.com
66
description = A secure updater framework for Python

0 commit comments

Comments
 (0)