Skip to content

Commit

Permalink
Use importlib.metadata instead of pkg_resources (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw authored Oct 9, 2023
1 parent 4948154 commit 170a4d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions audbackend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

# Dynamically get the version of the installed module
try:
import pkg_resources
__version__ = pkg_resources.get_distribution(__name__).version
import importlib.metadata
__version__ = importlib.metadata.version(__name__)
except Exception: # pragma: no cover
pkg_resources = None # pragma: no cover
importlib = None # pragma: no cover
finally:
del pkg_resources
del importlib

0 comments on commit 170a4d7

Please sign in to comment.