Skip to content

Commit

Permalink
Attempt to fix docs / python <3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
asross committed Mar 5, 2022
1 parent 56f609d commit bff0712
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/environment.yml
Expand Up @@ -12,6 +12,7 @@ dependencies:
- numpydoc
- jupyter_client
- ipykernel
- importlib_metadata
- pandoc
- pip
- pip:
Expand Down
6 changes: 5 additions & 1 deletion pyqg/__init__.py
Expand Up @@ -5,7 +5,11 @@
from .sqg_model import SQGModel
from .layered_model import LayeredModel
from .particles import LagrangianParticleArray2D, GriddedLagrangianParticleArray2D
from importlib.metadata import version, PackageNotFoundError

try:
from importlib.metadata import version, PackageNotFoundError
except ImportError:
from importlib_metadata import version, PackageNotFoundError

try:
__version__ = version("pyqg")
Expand Down

0 comments on commit bff0712

Please sign in to comment.