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

Use importlib instead of deprecated pkg_resources #124

Merged
merged 2 commits into from
Nov 10, 2023
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
6 changes: 3 additions & 3 deletions drizzle/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
A package for combining dithered images into a single image
"""
from importlib.metadata import PackageNotFoundError, version


from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version(__name__)
except PackageNotFoundError:

Check warning on line 9 in drizzle/__init__.py

View check run for this annotation

Codecov / codecov/patch

drizzle/__init__.py#L9

Added line #L9 was not covered by tests
# package is not installed
__version__ = 'unknown'
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@
return [Extension(str('drizzle.cdrizzle'), sources, **cfg)]


setup(ext_modules=get_extensions())
setup(

Check warning on line 38 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L38

Added line #L38 was not covered by tests
ext_modules=get_extensions(),
python_requires='>=3.7',
)
Loading