Permalink
Browse files

BUG: customize compiler when needed.

  • Loading branch information...
1 parent 4f70533 commit 0fe4cc31c44002334ee2445fc6af550941fe4b9c @cournape committed May 17, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 yaku/tools/pyext.py
View
@@ -412,18 +412,20 @@ def detect_type(vflag):
def get_distutils_cc_exec(ctx, compiler_type="default"):
from distutils import ccompiler
+ from distutils.sysconfig import customize_compiler
_OUTPUT.write("Detecting distutils CC exec ... ")
if compiler_type == "default":
compiler_type = \
distutils.ccompiler.get_default_compiler()
compiler = ccompiler.new_compiler(compiler=compiler_type)
+ customize_compiler(compiler)
if compiler_type == "msvc":
compiler.initialize()
cc = [compiler.cc]
else:
- cc = compiler.compiler_so
+ cc = compiler.compiler_so[:1]
_OUTPUT.write("%s\n" % " ".join(cc))
return cc

0 comments on commit 0fe4cc3

Please sign in to comment.