Skip to content

BLD: allow different options for compiler warnings on windows #12590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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']
Expand All @@ -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',
Expand Down