diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-11-09 09:48:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-09 09:48:46 -0700 |
commit | 965324ede75ffd48fbe6a323fb0e918688b350ad (patch) | |
tree | ee6d25f1fd722f761d0bdc4c7e95763de3d37113 /numpy/core/setup.py | |
parent | d185ece9cfdf37777d94e35b81f79d1eeb2356ff (diff) | |
parent | 2a26477c67bf319428ddcb78a5b6a8777754b845 (diff) | |
download | numpy-965324ede75ffd48fbe6a323fb0e918688b350ad.tar.gz |
Merge pull request #9977 from xoviat/squashed
MAINT: distutils: trivial cleanups
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 22eb63f45..371df5bec 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -6,6 +6,7 @@ import pickle import copy import sysconfig import warnings +import platform from os.path import join from numpy.distutils import log from distutils.dep_util import newer @@ -685,13 +686,16 @@ def configuration(parent_package='',top_path=None): join('src', 'npymath', 'npy_math_complex.c.src'), join('src', 'npymath', 'halffloat.c') ] + + # Must be true for CRT compilers but not MinGW/cygwin. See gh-9977. + is_msvc = platform.system() == 'Windows' 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", |