Skip to content

Commit 133ae75

Browse files
authored
Migrate from pkg_resources to importlib.metadata (#40)
1 parent dd58915 commit 133ae75

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run(self):
3333

3434
setuptools.setup(
3535
name='wavefront-cli',
36-
version='0.1.3',
36+
version='0.1.4',
3737
description='VMware Aria Operations for Applications CLI Utility.',
3838
long_description=long_description,
3939
url='https://github.com/wavefrontHQ/wavefront-cli',

wavefront_cli/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Initialize wavefront cli version."""
22

3-
import pkg_resources
3+
import importlib.metadata
44

55
__version__ = None
66

77
try:
8-
__version__ = pkg_resources.get_distribution('wavefront-cli').version
9-
except pkg_resources.DistributionNotFound:
8+
__version__ = importlib.metadata.version('wavefront-cli')
9+
except importlib.metadata.PackageNotFoundError:
1010
# __version__ is only available when the distribution is installed.
1111
pass

0 commit comments

Comments
 (0)