Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #80 from dstansby/astropy-v-check
Browse files Browse the repository at this point in the history
Check astropy version when importing pfsspy
  • Loading branch information
dstansby committed Feb 18, 2019
2 parents 0d4d7a1 + 58fa8b5 commit 77151ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pfsspy/__init__.py
@@ -1,3 +1,6 @@
import distutils.version

import astropy
import astropy.coordinates as coord
import astropy.constants as const
import astropy.units as u
Expand All @@ -14,6 +17,12 @@
__version__ = get_versions()['version']
del get_versions

# Do a version check for astropy
if (distutils.version.LooseVersion(astropy.__version__) <
distutils.version.LooseVersion("3")):
raise RuntimeError('pfsspy requires astropy v3 to run ' +
f'(found version {astropy.__version__} installed)')


class Grid:
"""
Expand Down

0 comments on commit 77151ba

Please sign in to comment.