11 lines
344 B
Python
11 lines
344 B
Python
|
import importlib.metadata
|
||
|
|
||
|
try:
|
||
|
from dunamai import Version, Style
|
||
|
|
||
|
__version__ = Version.from_git().serialize(style=Style.SemVer, dirty=True)
|
||
|
except ImportError:
|
||
|
# __name__ can be used if the package name is the same
|
||
|
# as the directory. Otherwise, specify it explicitely.
|
||
|
__version__ = importlib.metadata.version(__name__)
|