diff options
author | J. Goutin <JGoutin@users.noreply.github.com> | 2016-08-16 19:33:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-16 19:33:07 +0200 |
commit | f5802f369d5b7b76a7feb4c49e2e49840058bf3b (patch) | |
tree | 823cfd33bf782e0c108e8021ae87970f5e8f572f /setuptools/msvc.py | |
parent | 38d6743427f0aa31eaf2eb07df5cd11b6526d036 (diff) | |
download | external_python_setuptools-f5802f369d5b7b76a7feb4c49e2e49840058bf3b.tar.gz external_python_setuptools-f5802f369d5b7b76a7feb4c49e2e49840058bf3b.tar.bz2 external_python_setuptools-f5802f369d5b7b76a7feb4c49e2e49840058bf3b.zip |
Improve numpy.distutils detection
Agree with @pitrou comment.
Diffstat (limited to 'setuptools/msvc.py')
-rw-r--r-- | setuptools/msvc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 4646d83f..57153d8a 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -2,6 +2,7 @@ This module adds improved support for Microsoft Visual C++ compilers. """ import os +import sys import platform import itertools import distutils.errors @@ -225,7 +226,7 @@ def msvc14_gen_lib_options(*args, **kwargs): compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) """ - if "numpy" in distutils.ccompiler.CCompiler.spawn.__module__: + if "numpy.distutils" in sys.modules: import numpy as np return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) else: |