We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f35271d + 9792451 commit 2b5d1aeCopy full SHA for 2b5d1ae
level1c4pps/__init__.py
@@ -22,8 +22,7 @@
22
# Nina Hakansson <nina.hakansson@smhi.se>
23
24
"""Package Initializer for level1c4pps."""
25
-
26
-from pkg_resources import get_distribution, DistributionNotFound
+from importlib.metadata import version
27
import numpy as np
28
import xarray as xr
29
from datetime import datetime
@@ -38,11 +37,8 @@
38
37
datefmt='%H:%M:%S')
39
logger = logging.getLogger('level1c4pps')
40
xr.set_options(keep_attrs=True)
41
-try:
42
- __version__ = get_distribution(__name__).version
43
-except DistributionNotFound:
44
- # package is not installed
45
- pass
+
+__version__ = version(__name__)
46
47
PPS_TAGNAMES_TO_IMAGE_NR = {'ch_r06': 'image1',
48
'ch_r09': 'image2',
0 commit comments