Commit 8d1eecae authored by J. Goutin's avatar J. Goutin Committed by GitHub

Add numpy version check

parent 21be70b6
...@@ -6,6 +6,7 @@ import sys ...@@ -6,6 +6,7 @@ import sys
import platform import platform
import itertools import itertools
import distutils.errors import distutils.errors
from distutils.version import StrictVersion
from setuptools.extern.six.moves import filterfalse from setuptools.extern.six.moves import filterfalse
...@@ -228,8 +229,8 @@ def msvc14_gen_lib_options(*args, **kwargs): ...@@ -228,8 +229,8 @@ def msvc14_gen_lib_options(*args, **kwargs):
""" """
if "numpy.distutils" in sys.modules: if "numpy.distutils" in sys.modules:
import numpy as np import numpy as np
if StrictVersion(np.__version__) < StrictVersion('1.11.2'):
return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) return np.distutils.ccompiler.gen_lib_options(*args, **kwargs)
else:
return unpatched['msvc14_gen_lib_options'](*args, **kwargs) return unpatched['msvc14_gen_lib_options'](*args, **kwargs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment