Beispiel #1
0
 def __init__(self):
     super().__init__()
     self.__log = Logger.getlogger()
     self.__jinjaenv = None
     self.Base_TemplateDir = 'templates/base/'
     self.Command_TemplateDir = 'templates/cmds/'
     self.Command_OutputDir = 'templates/output/'
Beispiel #2
0
#!python3
"""
Script to generate the initial cmake wrapper class's / API
"""

import logging, sys
from apigen.Logger import Logger
from apigen.Generator import Generator

# Setup logging
Logger.LogLevel = logging.DEBUG
Logger.setup()
log = Logger.getlogger()

def main():
    try:
        # Generate Low level API Bindings
        gen = Generator()
        gen.Generate()

    # Output any errors
    except Exception as e:
        log.critical (e)
        if Logger.LogLevel == logging.DEBUG:
            import traceback
            traceback.print_exc(file=sys.stdout)
        sys.exit(1)

if __name__ == "__main__":
	main()
 def __init__(self, cmdfile: str, env: Environment, outdir: str):
     super().__init__()
     self.__log = Logger.getlogger()
     self.CommandFilePath = cmdfile
     self.__env = env
     self.OutputDirectory = outdir