diff --git a/src/setuptools_dso/compiler.py b/src/setuptools_dso/compiler.py index e7636a0..83e66a7 100644 --- a/src/setuptools_dso/compiler.py +++ b/src/setuptools_dso/compiler.py @@ -90,8 +90,9 @@ def new_compiler(**kws): if not compiler.initialized: # extra super lazy initialization... compiler.initialize() # populates self.cc among others - if compiler.__class__.preprocess is CCompiler.preprocess: - # default impl. is a no-op... + # Checks if the compiler's preprocess is a the same as CCompiler's as... + if compiler.__class__.preprocess.__code__ == CCompiler.preprocess.__code__: + # ... the default impl. in CCompiler is a no-op... compiler.preprocess = partial(_msvc_preprocess, compiler) if getattr(compiler, 'preprocessor', None) is None: