summaryrefslogtreecommitdiff
path: root/numpy/core/setup.py
diff options
context:
space:
mode:
authorxoviat <xoviat@users.noreply.github.com>2017-11-06 16:24:01 -0600
committerxoviat <xoviat@users.noreply.github.com>2017-11-06 16:29:44 -0600
commit5de0cfd610a543b8483b5fe2d54d000ec4c19bd6 (patch)
treec0423679c5dd587ccbc5c26a6b2c082bca7b90f0 /numpy/core/setup.py
parent1229545f8998940b8bfaf0556103e4bdf266b5e1 (diff)
downloadnumpy-5de0cfd610a543b8483b5fe2d54d000ec4c19bd6.tar.gz
BUG: core: fix setup handling
Check the compiler directly rather than platform for determining compiler arguments.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r--numpy/core/setup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index b87070d77..25efebad7 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -7,7 +7,7 @@ import copy
import sysconfig
import warnings
from os.path import join
-from numpy.distutils import log
+from numpy.distutils import log, customized_ccompiler
from distutils.dep_util import newer
from distutils.sysconfig import get_config_var
from numpy._build_utils.apple_accelerate import (
@@ -685,13 +685,15 @@ def configuration(parent_package='',top_path=None):
join('src', 'npymath', 'npy_math_complex.c.src'),
join('src', 'npymath', 'halffloat.c')
]
+
+ is_msvc = customized_ccompiler().compiler_type == 'msvc'
config.add_installed_library('npymath',
sources=npymath_sources + [get_mathlib_info],
install_dir='lib',
build_info={
- 'include_dirs' : [],
- 'extra_compiler_args' : (['/GL-'] if sys.platform == 'win32' else []),
- }) # empty list required for creating npy_math_internal.h
+ 'include_dirs' : [], # empty list required for creating npy_math_internal.h
+ 'extra_compiler_args' : (['/GL-'] if is_msvc else []),
+ })
config.add_npy_pkg_config("npymath.ini.in", "lib/npy-pkg-config",
subst_dict)
config.add_npy_pkg_config("mlib.ini.in", "lib/npy-pkg-config",