Exemple #1
0
    def do_build(self, subcmd, opts):
        """${cmd_name}: build a Komodo extension

        ${cmd_usage}
        ${cmd_option_list}
        Using the "--dev" option has the following effects:
        1. The "MODE" preprocessor define is "dev", instead of the default
           "release", for preprocessing of "*.p.*" files in the source tree.
        2. The "support_devinstall" build option is enabled to support the
           use of `koext devinstall` (built bits are copied from the "build"
           dir to the source area for in-place usage).
        """
        if opts.source_dir is None:
            opts.source_dir = os.curdir
        ppdefines = {
            "MODE": opts.mode,
        }
        if opts.defines:
            for pp_definition in opts.defines:
                def_split = pp_definition.split("=", 1)
                if len(def_split) == 2:
                    name, value = def_split
                    ppdefines[name] = value
        if opts.disable_preprocessing:
            ppdefines = None
        koextlib.build_ext(opts.source_dir,
            support_devinstall=(opts.mode=="dev"),
            unjarred=opts.unjarred,
            ppdefines=ppdefines,
            additional_includes=opts.additional_includes,
            log=log,
            xpi_path=opts.xpi_path)
Exemple #2
0
    def do_build(self, subcmd, opts):
        """${cmd_name}: build a Komodo extension

        ${cmd_usage}
        ${cmd_option_list}
        Using the "--dev" option has the following effects:
        1. The "MODE" preprocessor define is "dev", instead of the default
           "release", for preprocessing of "*.p.*" files in the source tree.
        2. The "support_devinstall" build option is enabled to support the
           use of `koext devinstall` (built bits are copied from the "build"
           dir to the source area for in-place usage).
        """
        if opts.source_dir is None:
            opts.source_dir = os.curdir
        ppdefines = {
            "MODE": opts.mode,
        }
        if opts.defines:
            for pp_definition in opts.defines:
                def_split = pp_definition.split("=", 1)
                if len(def_split) == 2:
                    name, value = def_split
                    ppdefines[name] = value
        if opts.disable_preprocessing:
            ppdefines = None
        koextlib.build_ext(opts.source_dir,
                           support_devinstall=(opts.mode == "dev"),
                           unjarred=opts.unjarred,
                           ppdefines=ppdefines,
                           additional_includes=opts.additional_includes,
                           log=log,
                           xpi_path=opts.xpi_path)