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

arigo at codespeak.net arigo at codespeak.net
Fri Sep 14 15:30:51 CEST 2007


Author: arigo
Date: Fri Sep 14 15:30:51 2007
New Revision: 46583

Modified:
   pypy/dist/pypy/translator/tool/cbuild.py
Log:
Ouch, it's more complicated than expected to force a recompile.


Modified: pypy/dist/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/dist/pypy/translator/tool/cbuild.py	(original)
+++ pypy/dist/pypy/translator/tool/cbuild.py	Fri Sep 14 15:30:51 2007
@@ -128,7 +128,7 @@
                                     libraries=libraries,)
                                 ],
                             'script_name': 'setup.py',
-                            'script_args': ['-q', 'build_ext', '--inplace'],
+                            'script_args': ['-q', 'build_ext', '--inplace', '--force'],
                             }
                         dist = Distribution(attrs)
                         if not dist.parse_command_line():
@@ -165,13 +165,10 @@
         cache_dir = py.path.local(pypydir).join('_cache')
     else:
         cache_dir = py.path.local(cache_dir)
-    if cache_dir.check(dir=1):
-        # XXX check timestamps of all cfiles
-        if 1:  # not cache_dir.join(modname + '.so').check():
-            modname = str(cache_dir.join(modname))
-            compile_c_module(cfiles, modname, include_dirs=include_dirs,
-                             libraries=libraries)
-            
+    assert cache_dir.check(dir=1)   # XXX
+    modname = str(cache_dir.join(modname))
+    compile_c_module(cfiles, modname, include_dirs=include_dirs,
+                     libraries=libraries)
 
 def make_module_from_c(cfile, include_dirs=None, libraries=[]):
     cfile = py.path.local(cfile)



More information about the Pypy-commit mailing list