From ef418e1c4016b5ffcaf0968b1164c569a5d137e7 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Fri, 1 Dec 2023 15:41:57 +0800 Subject: [PATCH] Dev: unify version string used in setup.py and autotools --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 89758a40b..b70b53b46 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,16 @@ # Note that this script only installs the python modules, # the other parts of crmsh are installed by autotools from setuptools import setup +import contextlib + +VERSION = '0.0.1' + +with contextlib.suppress(Exception): + with open('version', 'r', encoding='ascii') as f: + VERSION = f.read().strip() setup(name='crmsh', - version='4.5.0', + version=VERSION, description='Command-line interface for High-Availability cluster management', author='Kristoffer Gronlund, Xin Liang', author_email='XLiang@suse.com',