[pypy-svn] r33778 - pypy/dist/pypy/translator/cli

antocuni at codespeak.net antocuni at codespeak.net
Thu Oct 26 17:32:37 CEST 2006


Author: antocuni
Date: Thu Oct 26 17:32:36 2006
New Revision: 33778

Modified:
   pypy/dist/pypy/translator/cli/rte.py
Log:
Automatically delete query-descriptions whenever query.cs has been
modified.



Modified: pypy/dist/pypy/translator/cli/rte.py
==============================================================================
--- pypy/dist/pypy/translator/cli/rte.py	(original)
+++ pypy/dist/pypy/translator/cli/rte.py	Thu Oct 26 17:32:36 2006
@@ -88,6 +88,15 @@
     SOURCES = ['query.cs']
     OUTPUT = 'query.exe'
 
+    def compile(cls, sources, out):
+        # assume that if query.exe need to be recompiled the descriptions cache is invalid        
+        from pypy.translator.cli.query import _descfilename
+        filename = _descfilename(None)
+        if os.path.exists(filename):
+            os.remove(filename)
+        Target.compile.im_func(cls, sources, out)
+    compile = classmethod(compile)
+
 def get_pypy_dll():
     if os.environ.get('PYPYLIB', '').lower() == 'unix':
         DLL = UnixDLL



More information about the Pypy-commit mailing list