[pypy-svn] r49156 - in pypy/dist/pypy/tool: . test

fijal at codespeak.net fijal at codespeak.net
Sun Nov 25 23:01:04 CET 2007


Author: fijal
Date: Sun Nov 25 23:01:02 2007
New Revision: 49156

Modified:
   pypy/dist/pypy/tool/gcc_cache.py
   pypy/dist/pypy/tool/test/test_gcc_cache.py
Log:
Fix gcc_cache. Not sure if it's used anymore in more than some obscure
cases though....


Modified: pypy/dist/pypy/tool/gcc_cache.py
==============================================================================
--- pypy/dist/pypy/tool/gcc_cache.py	(original)
+++ pypy/dist/pypy/tool/gcc_cache.py	Sun Nov 25 23:01:02 2007
@@ -1,9 +1,10 @@
 
 from pypy.tool.autopath import pypydir
-from pypy.translator.tool.cbuild import build_executable
+from pypy.translator.tool.cbuild import build_executable, ExternalCompilationInfo
 import md5
 import py
 import distutils
+import distutils.errors
 
 py.path.local(pypydir).join('_cache').ensure(dir=1)
 cache_dir = py.path.local(pypydir).join('_cache', 'gcc')

Modified: pypy/dist/pypy/tool/test/test_gcc_cache.py
==============================================================================
--- pypy/dist/pypy/tool/test/test_gcc_cache.py	(original)
+++ pypy/dist/pypy/tool/test/test_gcc_cache.py	Sun Nov 25 23:01:02 2007
@@ -2,6 +2,7 @@
 from pypy.tool.gcc_cache import *
 from pypy.tool.udir import udir
 import md5
+from pypy.translator.tool.cbuild import ExternalCompilationInfo
 
 def test_gcc_exec():
     f = udir.join("x.c")
@@ -18,8 +19,8 @@
         cache_dir.join(md5.md5(f.read()).hexdigest()).remove()
     except:
         pass
-    assert build_executable_cache([f]) == "3\n"
-    assert build_executable_cache([f], compiler_exe="xxx") == "3\n"
+    assert build_executable_cache([f], ExternalCompilationInfo()) == "3\n"
+    assert build_executable_cache([f], ExternalCompilationInfo(), compiler_exe="xxx") == "3\n"
 
 def test_gcc_ask():
     f = udir.join("y.c")
@@ -33,5 +34,5 @@
         cache_dir.join(md5.md5(f.read()).hexdigest()).remove()
     except:
         pass
-    assert try_compile_cache([f])
-    assert try_compile_cache([f], compiler_exe="xxx")
+    assert try_compile_cache([f], ExternalCompilationInfo())
+    assert try_compile_cache([f], ExternalCompilationInfo(), compiler_exe="xxx")



More information about the Pypy-commit mailing list