Cleanup version computation, add gisaf.__version__
This commit is contained in:
parent
a3a2efe471
commit
8d34c450e3
2 changed files with 20 additions and 33 deletions
|
@ -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")
|
Loading…
Add table
Add a link
Reference in a new issue