Skip to content

Commit

Permalink
use importlib.metadata instead of pkg_resources (removed in python 3.12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jornbr committed Sep 8, 2024
1 parent 1a7faa3 commit 19ccf2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parsac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

__version__ = 'version not available'

from pkg_resources import get_distribution, DistributionNotFound
import importlib.metadata
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = importlib.metadata.version("parsac")
except importlib.metadata.PackageNotFoundError:
try:
from setuptools_scm import get_version
__version__ = get_version(root='..', relative_to=__file__)
Expand Down

0 comments on commit 19ccf2b

Please sign in to comment.