Lines Matching +full:ex +full:-
2 # See the COPYING file in the top-level directory.
21 def invalid_prefix_char(prefix: str) -> Optional[str]:
22 match = must_match(r'([A-Za-z_.-][A-Za-z0-9_.-]*)?', prefix)
28 def create_backend(path: str) -> QAPIBackend:
34 raise QAPIError("argument of -B must be of the form MODULE.CLASS")
38 except Exception as ex:
39 raise QAPIError(f"unable to import '{module_path}': {ex}") from ex
43 except AttributeError as ex:
45 f"module '{module_path}' has no class '{class_name}'") from ex
49 except Exception as ex:
51 f"backend '{path}' cannot be instantiated: {ex}") from ex
60 def main() -> int:
62 gapi-gen executable entry point.
63 Expects arguments via sys.argv, see --help for details.
69 parser.add_argument('-b', '--builtins', action='store_true',
70 help="generate code for built-in types")
71 parser.add_argument('-o', '--output-dir', action='store',
74 parser.add_argument('-p', '--prefix', action='store',
77 parser.add_argument('-u', '--unmask-non-abi-names', action='store_true',
79 help="expose non-ABI names in introspection")
80 parser.add_argument('-B', '--backend', default=None,
83 # Option --suppress-tracing exists so we can avoid solving build system
85 parser.add_argument('--suppress-tracing', action='store_true',
93 msg = f"funny character '{funny_char}' in argument of --prefix"