Skip to content

Commit

Permalink
Remove deprecated pkg_resources call
Browse files Browse the repository at this point in the history
  • Loading branch information
mdales committed Oct 24, 2024
1 parent b800b55 commit 1af8d32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yirgacheffe/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from osgeo import gdal
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
pass # package is not installed
from importlib import metadata
__version__ = metadata.version(__name__)
except ModuleNotFoundError:
__version__ = "unknown"

gdal.UseExceptions()

Expand Down

0 comments on commit 1af8d32

Please sign in to comment.