[pypy-svn] r66711 - pypy/trunk/pypy/config

arigo at codespeak.net arigo at codespeak.net
Fri Jul 31 10:48:53 CEST 2009


Author: arigo
Date: Fri Jul 31 10:48:50 2009
New Revision: 66711

Modified:
   pypy/trunk/pypy/config/translationoption.py
Log:
Rewrite --jit option acceptance to be based on the presence of
the 'pypy.jit' package.


Modified: pypy/trunk/pypy/config/translationoption.py
==============================================================================
--- pypy/trunk/pypy/config/translationoption.py	(original)
+++ pypy/trunk/pypy/config/translationoption.py	Fri Jul 31 10:48:50 2009
@@ -17,6 +17,10 @@
     'distutils',
 ]
 
+def check_have_jit(config):
+    import pypy.jit       # check out branch/pyjitpl5 instead of trunk!
+
+
 translation_optiondescription = OptionDescription(
         "translation", "Translation Options", [
     BoolOption("stackless", "enable stackless features during compilation",
@@ -100,8 +104,7 @@
     # JIT generation
     BoolOption("jit", "generate a JIT",
                default=False, cmdline="--jit",
-               validator=lambda config:
-                   py.test.fail("check out branch/pyjitpl5 instead of trunk!"),
+               validator=check_have_jit,
                requires=[("translation.gc", "boehm"),
                          ("translation.list_comprehension_operations", True)]),
 



More information about the Pypy-commit mailing list