Skip to content

Commit

Permalink
Merge pull request #16 from bsilverthorn/mac-51-set-package__version__
Browse files Browse the repository at this point in the history
set `maccarone.__version__` from package metadata
  • Loading branch information
bsilverthorn authored Aug 24, 2023
2 parents 3a32b73 + 5fb2431 commit f7585a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/maccarone/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from importlib.metadata import (
version,
PackageNotFoundError,
)

try:
__version__ = version(__name__)
except PackageNotFoundError as error:
__version__ = "unknown"

0 comments on commit f7585a8

Please sign in to comment.