From 5155ba7431b137dcb3ad2007246645e0854288a6 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 3 Mar 2022 15:30:13 +0200 Subject: [PATCH] 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 --- pyproject.toml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7dea5d93..266d2cfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ # Build-system section [build-system] -requires = ["setuptools>=40.8.0", "wheel"] +requires = ["setuptools>=46.4.0", "wheel"] build-backend = "setuptools.build_meta" # Black section diff --git a/setup.cfg b/setup.cfg index 607c7922..97ffdc9f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = tuf -version = 1.0.0 +version = attr: tuf.__version__ author = https://www.updateframework.com author_email = theupdateframework@googlegroups.com description = A secure updater framework for Python