[pypy-svn] r48692 - pypy/dist/pypy/translator/tool

fijal at codespeak.net fijal at codespeak.net
Wed Nov 14 20:50:16 CET 2007


Author: fijal
Date: Wed Nov 14 20:50:16 2007
New Revision: 48692

Modified:
   pypy/dist/pypy/translator/tool/cbuild.py
Log:
* Fix the bug
* Make src dir to be there by default


Modified: pypy/dist/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/dist/pypy/translator/tool/cbuild.py	(original)
+++ pypy/dist/pypy/translator/tool/cbuild.py	Wed Nov 14 20:50:16 2007
@@ -2,6 +2,7 @@
 
 import os, sys, inspect, re, imp
 from pypy.translator.tool import stdoutcapture
+from pypy.tool.autopath import pypydir
 
 import py
 from pypy.tool.ansi_print import ansi_log
@@ -48,6 +49,7 @@
     #    print "ERROR IMPORTING"
     #    pass
     include_dirs = list(include_dirs)
+    include_dirs.append(py.path.local(pypydir).join('translator', 'c'))
     library_dirs = list(library_dirs)
     if sys.platform == 'darwin':    # support Fink & Darwinports
         for s in ('/sw/', '/opt/local/'):
@@ -141,7 +143,7 @@
         lastdir.chdir()
 
 def cache_c_module(cfiles, modname, cache_dir=None,
-                   include_dirs=None, libraries=[]):
+                   include_dirs=[], libraries=[]):
     """ Same as build c module, but instead caches results.
     XXX currently there is no way to force a recompile, so this is pretty
     useless as soon as the sources (or headers they depend on) change :-/



More information about the Pypy-commit mailing list