Skip to content

Commit

Permalink
Added check to ensure that NumPy and SciPy meet minimum version requi…
Browse files Browse the repository at this point in the history
…rements (NumPy >= 1.6.1, SciPy >= 0.9)
  • Loading branch information
acganesh committed Sep 2, 2015
1 parent e2e5fbd commit 4b320ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os
import shutil
from distutils.command.clean import clean as Clean
from pkg_resources import parse_version


if sys.version_info[0] < 3:
Expand Down Expand Up @@ -117,16 +118,18 @@ def configuration(parent_package='', top_path=None):
def is_scipy_installed():
try:
import scipy
scipy_min_version = '0.9'
return parse_version(scipy.__version__) >= parse_version(scipy_min_version)
except ImportError:
return False
return True

def is_numpy_installed():
try:
import numpy
numpy_min_version = '1.6.1'
return parse_version(numpy.__version__) >= parse_version(numpy_min_version)
except ImportError:
return False
return True

def setup_package():
metadata = dict(name=DISTNAME,
Expand Down

0 comments on commit 4b320ce

Please sign in to comment.