From 2bbbdccd2a011944796ec1250c9fccc6ce0e8b9b Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Fri, 1 Dec 2023 09:44:12 +0100 Subject: [PATCH] dev(build): use more reliable setup code to read the current version --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3fbd3acf..373cac0f 100644 --- a/setup.py +++ b/setup.py @@ -104,8 +104,12 @@ test_requirements = _get_requirements( def get_version(): - version = pkgutil.get_data('rhodecode', 'VERSION') - return version.decode().strip() + here = os.path.abspath(os.path.dirname(__file__)) + ver_file = os.path.join(here, "rhodecode", "VERSION") + with open(ver_file, "rt") as f: + version = f.read().strip() + + return version # additional files that goes into package itself