Skip to content

Commit e9fde88

Browse files
committed
BLD: suppress useless warnings
Author: Jeff Reback <[email protected]> Closes #12589 from jreback/warnings and squashes the following commits: 0156618 [Jeff Reback] BLD: suppress useless warnings
1 parent f258844 commit e9fde88

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

setup.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ def srcpath(name=None, suffix='.pyx', subdir='src'):
375375
def pxd(name):
376376
return os.path.abspath(pjoin('pandas', name + '.pxd'))
377377

378+
# args to ignore warnings
379+
extra_compile_args=['-Wno-unused-function']
378380

379381
lib_depends = lib_depends + ['pandas/src/numpy_helper.h',
380382
'pandas/src/parse_helper.h']
@@ -440,7 +442,7 @@ def pxd(name):
440442
sources=sources,
441443
depends=data.get('depends', []),
442444
include_dirs=include,
443-
extra_compile_args=['-w'])
445+
extra_compile_args=extra_compile_args)
444446

445447
extensions.append(obj)
446448

@@ -449,15 +451,15 @@ def pxd(name):
449451
sources=[srcpath('sparse', suffix=suffix)],
450452
include_dirs=[],
451453
libraries=libraries,
452-
extra_compile_args=['-w'])
454+
extra_compile_args=extra_compile_args)
453455

454456
extensions.extend([sparse_ext])
455457

456458
testing_ext = Extension('pandas._testing',
457459
sources=[srcpath('testing', suffix=suffix)],
458460
include_dirs=[],
459461
libraries=libraries,
460-
extra_compile_args=['-w'])
462+
extra_compile_args=extra_compile_args)
461463

462464
extensions.extend([testing_ext])
463465

@@ -478,7 +480,7 @@ def pxd(name):
478480
language='c++',
479481
include_dirs=['pandas/src/msgpack'] + common_include,
480482
define_macros=macros,
481-
extra_compile_args=['-w'])
483+
extra_compile_args=extra_compile_args)
482484
unpacker_ext = Extension('pandas.msgpack._unpacker',
483485
depends=['pandas/src/msgpack/unpack.h',
484486
'pandas/src/msgpack/unpack_define.h',
@@ -489,7 +491,7 @@ def pxd(name):
489491
language='c++',
490492
include_dirs=['pandas/src/msgpack'] + common_include,
491493
define_macros=macros,
492-
extra_compile_args=['-w'])
494+
extra_compile_args=extra_compile_args)
493495
extensions.append(packer_ext)
494496
extensions.append(unpacker_ext)
495497

@@ -513,7 +515,7 @@ def pxd(name):
513515
include_dirs=['pandas/src/ujson/python',
514516
'pandas/src/ujson/lib',
515517
'pandas/src/datetime'] + common_include,
516-
extra_compile_args=['-D_GNU_SOURCE', '-w'])
518+
extra_compile_args=['-D_GNU_SOURCE'] + extra_compile_args)
517519

518520

519521
extensions.append(ujson_ext)

0 commit comments

Comments
 (0)