From 4b030d242ec05c891e9e764e1db29207c53bacde Mon Sep 17 00:00:00 2001 From: Wout Date: Tue, 18 May 2021 09:17:06 -0700 Subject: [PATCH] Fix version retrieval from package name --- falcon/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/falcon/__init__.py b/falcon/__init__.py index 227f647..c5fedfe 100644 --- a/falcon/__init__.py +++ b/falcon/__init__.py @@ -1,14 +1,16 @@ +pkg_name = 'falcon-ms' + try: from importlib.metadata import version, PackageNotFoundError try: - __version__ = version(__name__) + __version__ = version(pkg_name) except PackageNotFoundError: pass except ImportError: from pkg_resources import get_distribution, DistributionNotFound try: - __version__ = get_distribution(__name__).version + __version__ = get_distribution(pkg_name).version except DistributionNotFound: pass