Commit 645676e1 authored by Lisandro Dalcin's avatar Lisandro Dalcin

Windows: fixes for previous commit

parent 23360aab
...@@ -416,23 +416,22 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -416,23 +416,22 @@ class CythonCompileTestCase(unittest.TestCase):
build_extension.finalize_options() build_extension.finalize_options()
if COMPILER: if COMPILER:
build_extension.compiler = COMPILER build_extension.compiler = COMPILER
if (sys.platform == 'win32' and
build_extension.compiler == 'mingw32'):
CFLAGS.append('-Wno-format')
ext_include_dirs = [] ext_include_dirs = []
for match, get_additional_include_dirs in EXT_DEP_INCLUDES: for match, get_additional_include_dirs in EXT_DEP_INCLUDES:
if match(module): if match(module):
ext_include_dirs += get_additional_include_dirs() ext_include_dirs += get_additional_include_dirs()
self.copy_related_files(test_directory, workdir, module) ext_compile_flags = CFLAGS[:]
if build_extension.compiler == 'mingw32':
ext_compile_flags.append('-Wno-format')
if extra_extension_args is None: if extra_extension_args is None:
extra_extension_args = {} extra_extension_args = {}
self.copy_related_files(test_directory, workdir, module)
extension = Extension( extension = Extension(
module, module,
sources = self.find_source_files(workdir, module), sources = self.find_source_files(workdir, module),
include_dirs = ext_include_dirs, include_dirs = ext_include_dirs,
extra_compile_args = CFLAGS, extra_compile_args = ext_compile_flags,
**extra_extension_args **extra_extension_args
) )
if self.language == 'cpp': if self.language == 'cpp':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment