From e2b138a506e3b7dbe69ab1fba78d89aa3ce1a774 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Thu, 10 Mar 2016 21:08:33 -0500 Subject: [PATCH] BLD: allow different options for compiler warnings on windows --- setup.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9d3b8e25c9590..e3fb5a007aad3 100755 --- a/setup.py +++ b/setup.py @@ -14,6 +14,15 @@ import platform from distutils.version import LooseVersion +def is_platform_windows(): + return sys.platform == 'win32' or sys.platform == 'cygwin' + +def is_platform_linux(): + return sys.platform == 'linux2' + +def is_platform_mac(): + return sys.platform == 'darwin' + # versioning import versioneer cmdclass = versioneer.get_cmdclass() @@ -376,7 +385,10 @@ def pxd(name): return os.path.abspath(pjoin('pandas', name + '.pxd')) # args to ignore warnings -extra_compile_args=['-Wno-unused-function'] +if is_platform_windows(): + extra_compile_args=[] +else: + extra_compile_args=['-Wno-unused-function'] lib_depends = lib_depends + ['pandas/src/numpy_helper.h', 'pandas/src/parse_helper.h'] @@ -388,7 +400,7 @@ def pxd(name): # some linux distros require it -libraries = ['m'] if 'win32' not in sys.platform else [] +libraries = ['m'] if not is_platform_windows() else [] ext_data = dict( lib={'pyxfile': 'lib',