コード例 #1
0
ファイル: install-mob-tools.py プロジェクト: BIGtigr/xgcode
def main(args):
    stage = os.path.dirname(__file__)
    with open(os.path.join(stage, 'install-mob-tools.conf')) as fin:
        env_dict = lines_to_env_dict(fin)
    env_info = mobenv.create_environment_info(env_dict['auto_path'],
                                              env_dict['python_path'],
                                              env_dict['mob_core'],
                                              env_dict['mob_version'])
    install_xml_files(stage, env_info)
    install_python_subtree(stage, env_info)
    if args.deploy:
        cmd = env_info.get_deploy_command()
        subprocess.call(cmd)
コード例 #2
0
def main(args):
    stage = os.path.dirname(__file__)
    with open(os.path.join(stage, 'install-mob-tools.conf')) as fin:
        env_dict = lines_to_env_dict(fin)
    env_info = mobenv.create_environment_info(
            env_dict['auto_path'],
            env_dict['python_path'],
            env_dict['mob_core'],
            env_dict['mob_version'])
    install_xml_files(stage, env_info)
    install_python_subtree(stage, env_info)
    if args.deploy:
        cmd = env_info.get_deploy_command()
        subprocess.call(cmd)
コード例 #3
0
def main(args):
    # check for flag conflicts
    if args.deploy and args.make_installer:
        raise ValueError(
            'the "deploy" and "make_installer" flags are incompatible')
    # initialize the mobyle category information
    cat_info = mobyle.CategoryInfo(args.show_io_types, args.show_tags,
                                   args.universal_category)
    # get the module names
    module_names = meta.get_module_names(args.manifest, args.create_all,
                                         args.create_tagged)
    # define the environment on the target server
    auto_path = os.path.join(args.target, 'auto.py')
    env_info = mobenv.create_environment_info(auto_path, args.python_path,
                                              args.mobyle_core,
                                              args.mobyle_version)
    if args.make_installer:
        create_installer(args, cat_info, env_info, module_names)
    else:
        # create the python subtree
        meta.add_python_files(module_names, args.target)
        # create the mobyle xml interface files
        import_errors = mobyle.add_xml_files(cat_info, env_info, module_names,
                                             args.short_length,
                                             env_info.get_xml_dir(),
                                             args.runbsub)
        for e in import_errors:
            print e
    if args.clean:
        cmd = env_info.get_clean_command()
        subprocess.call(cmd)
    if args.index:
        cmd = env_info.get_index_command()
        subprocess.call(cmd)
    if args.deploy:
        cmd = env_info.get_deploy_command()
        subprocess.call(cmd)
コード例 #4
0
def main(args):
    # check for flag conflicts
    if args.deploy and args.make_installer:
        raise ValueError(
                'the "deploy" and "make_installer" flags are incompatible')
    # initialize the mobyle category information
    cat_info = mobyle.CategoryInfo(
            args.show_io_types, args.show_tags, args.universal_category)
    # get the module names
    module_names = meta.get_module_names(
            args.manifest, args.create_all, args.create_tagged)
    # define the environment on the target server
    auto_path = os.path.join(args.target, 'auto.py')
    env_info = mobenv.create_environment_info(
            auto_path, args.python_path,
            args.mobyle_core, args.mobyle_version)
    if args.make_installer:
        create_installer(args, cat_info, env_info, module_names)
    else:
        # create the python subtree
        meta.add_python_files(module_names, args.target)
        # create the mobyle xml interface files
        import_errors = mobyle.add_xml_files(
                cat_info, env_info,
                module_names, args.short_length, env_info.get_xml_dir(),
                args.runbsub)
        for e in import_errors:
            print e
    if args.clean:
        cmd = env_info.get_clean_command()
        subprocess.call(cmd)
    if args.index:
        cmd = env_info.get_index_command()
        subprocess.call(cmd)
    if args.deploy:
        cmd = env_info.get_deploy_command()
        subprocess.call(cmd)