Skip to content

Move the removal of the -Wstrict-prototypes flag to setup.py. #11965

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

Merged
merged 1 commit into from
Aug 29, 2018
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ def __init__(self, dist):

class BuildExtraLibraries(BuildExtCommand):
def run(self):
# Remove the -Wstrict-prototypes option, it's not valid for C++.
try:
self.compiler.compiler_so.remove('-Wstrict-prototypes')
except (ValueError, AttributeError):
pass
for package in good_packages:
package.do_custom_build()

return BuildExtCommand.run(self)


Expand Down
15 changes: 0 additions & 15 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,6 @@ def print_line(*args, **kwargs):
print_status = print_message = print_raw = print_line


# Remove the -Wstrict-prototypes option, is it's not valid for C++
customize_compiler = distutils.command.build_ext.customize_compiler


def my_customize_compiler(compiler):
retval = customize_compiler(compiler)
try:
compiler.compiler_so.remove('-Wstrict-prototypes')
except (ValueError, AttributeError):
pass
return retval

distutils.command.build_ext.customize_compiler = my_customize_compiler


def make_extension(name, files, *args, **kwargs):
"""
Make a new extension. Automatically sets include_dirs and
Expand Down