Cleanup version computation, add gisaf.__version__
All checks were successful
/ test (push) Successful in 31s
/ build (push) Successful in 2m22s

This commit is contained in:
phil 2025-03-16 19:52:28 +01:00
parent a3a2efe471
commit 8d34c450e3
2 changed files with 20 additions and 33 deletions

View file

@ -0,0 +1,11 @@
import importlib.metadata
try:
from dunamai import Version, Style
__version__ = Version.from_git().serialize(style=Style.SemVer, dirty=True)
except ImportError:
# __name__ could be used if the package name is the same
# as the directory - not the case here
# __version__ = importlib.metadata.version(__name__)
__version__ = importlib.metadata.version("gisaf-backend")