Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated pkg_resources call #7

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "numpy<2" gdal[numpy] scikit-image "h3==4.0.0b5"
python -m pip install "numpy<2" gdal[numpy]==3.9.2 scikit-image "h3==4.0.0b5"
python -m pip install pylint mypy pytest types-setuptools
- name: Lint with pylint
run: |
Expand Down
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
Loading