add --lenient option also to normal command line
authorStefan Behnel <stefan_ml@behnel.de>
Fri, 23 Aug 2013 21:02:12 +0000 (23:02 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Fri, 23 Aug 2013 21:02:12 +0000 (23:02 +0200)
Cython/Compiler/CmdLine.py

index 01ca68e..46b4f10 100644 (file)
@@ -36,6 +36,8 @@ Options:
   --embed[=<method_name>]        Generate a main() function that embeds the Python interpreter.
   -2                             Compile based on Python-2 syntax and code semantics.
   -3                             Compile based on Python-3 syntax and code semantics.
+  --lenient                      Change some compile time errors to runtime errors to
+                                 improve Python compatibility
   --capi-reexport-cincludes      Add cincluded headers to any auto-generated header files.
   --fast-fail                    Abort the compilation on the first error
   --warning-errors, -Werror      Make all warnings into errors
@@ -119,6 +121,9 @@ def parse_command_line(args):
             elif option == "--gdb":
                 options.gdb_debug = True
                 options.output_dir = os.curdir
+            elif option == "--lenient":
+                Options.error_on_unknown_names = False
+                Options.error_on_uninitialized = False
             elif option == '-2':
                 options.language_level = 2
             elif option == '-3':