diff --git a/parglare/__init__.py b/parglare/__init__.py index dc3d22b..b23a6ab 100644 --- a/parglare/__init__.py +++ b/parglare/__init__.py @@ -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")