[pypy-svn] r58895 - pypy/branch/cbuild-refactor/pypy/translator/tool

pedronis at codespeak.net pedronis at codespeak.net
Fri Oct 10 12:51:40 CEST 2008


Author: pedronis
Date: Fri Oct 10 12:51:40 2008
New Revision: 58895

Modified:
   pypy/branch/cbuild-refactor/pypy/translator/tool/cbuild.py
Log:
(fijal, pedronis)

for now use distutils.sysconfig to customize the compiler to get the right options to build a shared lib

things work again on Mac OS X



Modified: pypy/branch/cbuild-refactor/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/branch/cbuild-refactor/pypy/translator/tool/cbuild.py	(original)
+++ pypy/branch/cbuild-refactor/pypy/translator/tool/cbuild.py	Fri Oct 10 12:51:40 2008
@@ -479,11 +479,14 @@
 
     def _build(self):
         from distutils.ccompiler import new_compiler
+        from distutils import sysconfig
         compiler = new_compiler(force=1)
         if self.compiler_exe is not None:
             for c in '''compiler compiler_so compiler_cxx
                         linker_exe linker_so'''.split():
                 compiler.executables[c][0] = self.compiler_exe
+        if not self.standalone:
+            sysconfig.customize_compiler(compiler) # XXX
         compiler.spawn = log_spawned_cmd(compiler.spawn)
         objects = []
         for cfile in self.cfilenames:



More information about the Pypy-commit mailing list