Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fb0035f

Browse filesBrowse files
authored
Merge pull request #11965 from anntzer/wstrict-proto
Move the removal of the -Wstrict-prototypes flag to setup.py.
2 parents 6001bf2 + a85ac96 commit fb0035f
Copy full SHA for fb0035f

File tree

Expand file treeCollapse file tree

2 files changed

+5
-16
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-16
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ def __init__(self, dist):
108108

109109
class BuildExtraLibraries(BuildExtCommand):
110110
def run(self):
111+
# Remove the -Wstrict-prototypes option, it's not valid for C++.
112+
try:
113+
self.compiler.compiler_so.remove('-Wstrict-prototypes')
114+
except (ValueError, AttributeError):
115+
pass
111116
for package in good_packages:
112117
package.do_custom_build()
113-
114118
return BuildExtCommand.run(self)
115119

116120

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,6 @@ def print_line(*args, **kwargs):
202202
print_status = print_message = print_raw = print_line
203203

204204

205-
# Remove the -Wstrict-prototypes option, is it's not valid for C++
206-
customize_compiler = distutils.command.build_ext.customize_compiler
207-
208-
209-
def my_customize_compiler(compiler):
210-
retval = customize_compiler(compiler)
211-
try:
212-
compiler.compiler_so.remove('-Wstrict-prototypes')
213-
except (ValueError, AttributeError):
214-
pass
215-
return retval
216-
217-
distutils.command.build_ext.customize_compiler = my_customize_compiler
218-
219-
220205
def make_extension(name, files, *args, **kwargs):
221206
"""
222207
Make a new extension. Automatically sets include_dirs and

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.