From 5de0cfd610a543b8483b5fe2d54d000ec4c19bd6 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 6 Nov 2017 16:24:01 -0600 Subject: BUG: core: fix setup handling Check the compiler directly rather than platform for determining compiler arguments. --- numpy/core/setup.py | 10 ++++++---- 1 file 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", -- cgit v1.2.1