Skip to content

Commit

Permalink
Replace pkg_resources with importlib for Py 3.12+ compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
reuterbal committed Dec 10, 2024
1 parent 6501e17 commit 484064b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ifsbench/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
This package contains Python utilities to run and benchmark the IFS.
"""

from pkg_resources import get_distribution, DistributionNotFound
from importlib.metadata import version, PackageNotFoundError

from .arch import * # noqa
from .benchmark import * # noqa
Expand All @@ -31,7 +31,7 @@
from .util import * # noqa

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version("ifsbench")
except PackageNotFoundError:
# package is not installed
pass

0 comments on commit 484064b

Please sign in to comment.