Fix __version__
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed

This commit is contained in:
phil 2025-06-27 02:55:59 +02:00
parent 4e9313f0c6
commit 1150bc160a

View file

@ -4,7 +4,7 @@ try:
from dunamai import Version, Style
__version__ = Version.from_git().serialize(style=Style.SemVer, dirty=True)
except ImportError:
except (ImportError, RuntimeError):
# __name__ can be used if the package name is the same
# as the directory. Otherwise, specify it explicitely.
__version__ = importlib.metadata.version(__name__)