dev(build): use more reliable setup code to read the current version

This commit is contained in:
RhodeCode Admin 2023-12-01 09:44:12 +01:00
parent 3bb8788553
commit 2bbbdccd2a

View file

@ -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