[pypy-svn] r33477 - pypy/branch/even-more-config3/pypy/config

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Oct 19 20:31:08 CEST 2006


Author: cfbolz
Date: Thu Oct 19 20:31:07 2006
New Revision: 33477

Modified:
   pypy/branch/even-more-config3/pypy/config/config.py
   pypy/branch/even-more-config3/pypy/config/pypyoption.py
Log:
(cfbolz, pedronis probably too): oops, forgot to check that one in


Modified: pypy/branch/even-more-config3/pypy/config/config.py
==============================================================================
--- pypy/branch/even-more-config3/pypy/config/config.py	(original)
+++ pypy/branch/even-more-config3/pypy/config/config.py	Thu Oct 19 20:31:07 2006
@@ -438,7 +438,8 @@
 
         return option.help
 
-def to_optparse(config, useoptions=None, parser=None):
+def to_optparse(config, useoptions=None, parser=None,
+                parserargs=None, parserkwargs=None):
     grps = {}
     def get_group(name, doc):
         steps = name.split('.')
@@ -451,7 +452,13 @@
         return grp
 
     if parser is None:
-        parser = optparse.OptionParser(formatter=OptHelpFormatter())
+        if parserargs is None:
+            parserargs = []
+        if parserkwargs is None:
+            parserkwargs = {}
+        parser = optparse.OptionParser(
+            formatter=OptHelpFormatter(),
+            *parserargs, **parserkwargs)
     if useoptions is None:
         useoptions = config.getpaths(include_groups=True)
     seen = {}

Modified: pypy/branch/even-more-config3/pypy/config/pypyoption.py
==============================================================================
--- pypy/branch/even-more-config3/pypy/config/pypyoption.py	(original)
+++ pypy/branch/even-more-config3/pypy/config/pypyoption.py	Thu Oct 19 20:31:07 2006
@@ -96,6 +96,9 @@
                        "specify whether the default metaclass should be classobj",
                        default=False, cmdline="--oldstyle"),
          ]),
+        BoolOption("lowmem", "Try to use little memory during translation",
+                   default=False, cmdline="--lowmem",
+                   requires=[("objspace.geninterp", False)]),
 
 
     ]),
@@ -106,8 +109,7 @@
     OptionDescription("translation", "Translation Options", [
         BoolOption("stackless", "compile stackless features in",
                    default=False, cmdline="--stackless",
-                   requires=[("translation.type_system", "lltype"),
-                             ("objspace.usemodules._stackless", True)]),
+                   requires=[("translation.type_system", "lltype")]),
         ChoiceOption("type_system", "Type system to use when RTyping",
                      ["lltype", "ootype"], cmdline=None),
         ChoiceOption("backend", "Backend to use for code generation",
@@ -129,7 +131,7 @@
                       cmdline="--gc"),
 
         BoolOption("thread", "enable use of threading primitives",
-                   default=False),
+                   default=False, cmdline="--thread"),
         BoolOption("verbose", "Print extra information", default=False),
         BoolOption("debug", "Record extra annotation information",
                    cmdline="-d --debug", default=False),
@@ -137,9 +139,6 @@
                    cmdline="--insist"),
         BoolOption("countmallocs", "Count mallocs and frees", default=False,
                    cmdline=None),
-        BoolOption("lowmem", "Try to use little memory during translation",
-                   default=False, cmdline="--lowmem",
-                   requires=[("objspace.geninterp", False)]),
 
         # misc
         StrOption("cc", "Specify compiler", cmdline="--cc"),



More information about the Pypy-commit mailing list