On Tue, Sep 22, 2020 at 05:00:26PM -0400, John Snow wrote: > As part of delinting and adding type hints to the QAPI generator, it's > helpful for the entrypoint to be part of the package, only leaving a > very tiny entrypoint shim outside of the module. > > Signed-off-by: John Snow <js...@redhat.com> > --- > scripts/qapi-gen.py | 90 +++---------------------------------------- > scripts/qapi/main.py | 91 ++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 97 insertions(+), 84 deletions(-) > create mode 100644 scripts/qapi/main.py > [...] > diff --git a/scripts/qapi/main.py b/scripts/qapi/main.py > new file mode 100644 > index 0000000000..18c246bbb4 > --- /dev/null > +++ b/scripts/qapi/main.py > @@ -0,0 +1,91 @@ > +# This work is licensed under the terms of the GNU GPL, version 2 or later. > +# See the COPYING file in the top-level directory. > + > +""" > +QAPI Generator > + > +This is the main entry point for generating C code from the QAPI schema. > +""" > + > +import argparse > +import re > +import sys > + > +from qapi.commands import gen_commands > +from qapi.doc import gen_doc > +from qapi.error import QAPIError > +from qapi.events import gen_events > +from qapi.introspect import gen_introspect > +from qapi.schema import QAPISchema > +from qapi.types import gen_types > +from qapi.visit import gen_visit
Do you plan to change this to use relative imports eventually? In either case: Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> -- Eduardo