Skip to content

Commit

Permalink
Suppress more warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanholek committed Feb 18, 2017
1 parent 8d443d0 commit 7d930f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup.py
Expand Up @@ -65,6 +65,8 @@ def __init__(self, name):
else:
self.use_static_readline()

self.suppress_warnings()

def have_curl(self):
if not find_executable('curl'):
log.warn('WARNING: Cannot build statically. Command not found: curl')
Expand All @@ -85,15 +87,15 @@ def use_library_dirs(self):
self.library_dirs.append(match.group(1))

def suppress_warnings(self):
cflags = get_config_var('CFLAGS')
cflags = ' '.join(get_config_vars('CPPFLAGS', 'CFLAGS'))
cflags = cflags.split()

# -Wno-all is not supported by gcc < 4.2
if sys.platform == 'darwin':
if '-Wall' in cflags:
self.extra_compile_args.append('-Wno-all')

if '-Wstrict-prototypes' in cflags:
self.extra_compile_args.append('-Wno-strict-prototypes')
if '-Wsign-compare' in cflags:
self.extra_compile_args.append('-Wno-sign-compare')

def use_static_readline(self):
self.sources.extend([
Expand Down Expand Up @@ -140,8 +142,6 @@ def use_static_readline(self):
self.include_dirs = ['build', 'build/readline'] + self.include_dirs
self.libraries.remove('readline')

self.suppress_warnings()


class ReadlineExtensionBuilder(build_ext):

Expand Down

0 comments on commit 7d930f6

Please sign in to comment.