Skip to content

Commit

Permalink
fix: get version from importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
igordejanovic committed Feb 9, 2024
1 parent a5df0d9 commit cd88d53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion parglare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
from parglare.exceptions import ParserInitError, ParseError, GrammarError, \
DisambiguationError, LoopError

from .version import __version__
try:
from importlib.metadata import version
except ModuleNotFoundError:
from importlib_metadata import version

__version__ = version("parglare")

0 comments on commit cd88d53

Please sign in to comment.