Skip to content

Commit

Permalink
Changed how compiler.preprocess() is compared to the default impl
Browse files Browse the repository at this point in the history
  • Loading branch information
OCopping committed Apr 25, 2024
1 parent ec7dfd5 commit 791afe2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/setuptools_dso/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 791afe2

Please sign in to comment.