Skip to content

Commit

Permalink
BUG: fixed init metadata
Browse files Browse the repository at this point in the history
Fixed init metadata by:
- moving all imports to top, and
- robustly importing metadata submodule.
  • Loading branch information
aburrell committed Oct 5, 2023
1 parent 8e96fa7 commit 1148c1e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pysatNASA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
"""

import importlib
import importlib_metadata
try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata

from pysatNASA import constellations # noqa F401
from pysatNASA import instruments # noqa F401

# set version
try:
__version__ = importlib.metadata.version('pysatNASA')
except AttributeError:
# Python 3.6 requires a different version
__version__ = importlib_metadata.version('pysatNASA')
__version__ = metadata.version('pysatNASA')

0 comments on commit 1148c1e

Please sign in to comment.