Skip to content

Commit d5b150b

Browse files
committed
BLD: Fix removal of -Wstrict-prototypes option.
Current releases of distutils (2.7 & 3.5, at least) import customize_compiler into the build_ext namespace, so changing the original doesn't actually have any effect.
1 parent 612856a commit d5b150b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

setupext.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from distutils import sysconfig
44
from distutils import version
55
from distutils.core import Extension
6+
import distutils.command.build_ext
67
import glob
78
import multiprocessing
89
import os
@@ -228,8 +229,8 @@ def print_line(*args, **kwargs):
228229
print_status = print_message = print_raw = print_line
229230

230231

231-
# Remove the -Wstrict-prototypesoption, is it's not valid for C++
232-
customize_compiler = sysconfig.customize_compiler
232+
# Remove the -Wstrict-prototypes option, is it's not valid for C++
233+
customize_compiler = distutils.command.build_ext.customize_compiler
233234

234235

235236
def my_customize_compiler(compiler):
@@ -240,7 +241,7 @@ def my_customize_compiler(compiler):
240241
pass
241242
return retval
242243

243-
sysconfig.customize_compiler = my_customize_compiler
244+
distutils.command.build_ext.customize_compiler = my_customize_compiler
244245

245246

246247
def make_extension(name, files, *args, **kwargs):

0 commit comments

Comments
 (0)