Exemplo n.º 1
0
def main():
    if is_setup_done():
        sdk.die('SDK setup already done.')

    args = parse_args()

    setup(args.install_root, args.relocate)

    if args.command:
        sys.exit(subprocess.call(args.command))
    elif args.shell:
        sdk.start_subshell()
Exemplo n.º 2
0
def main():
    if is_setup_done():
        sdk.die('SDK setup already done.')

    args = parse_args()

    setup(args.install_root, args.relocate)

    if args.command:
        sys.exit(subprocess.call(args.command))
    elif args.shell:
        sdk.start_subshell()
Exemplo n.º 3
0
def main():
    args = parse_command_line()

    # Prepare the build plan
    # plan :: (component_name, build_function, abs_source_directory_path)
    plan = []

    def add_to_plan(plan, component_name, build_f, source_directory):
        plan.append((component_name, build_f, source_directory))

    add_to_plan(plan, 'icu', build_icu, args.with_icu_sources)
    add_to_plan(plan, 'qt', build_qt, args.with_qt_sources)
    add_to_plan(plan, 'sip', build_sip, args.with_sip_sources)
    add_to_plan(plan, 'pyqt', build_pyqt, args.with_pyqt_sources)

    # If user specified some packages on the command line, build only those
    if args.packages != 'all':
        plan = [entry for entry in plan if entry[0] in args.packages]

    # Get this installation's layout
    layout = sdk.get_layout(sdk.platform_root(args.install_root))

    # Setup build environment
    prep(layout)

    # --only-merge stops the build here.
    if args.only_merge:
        merge(layout)
        return

    # --shell stops the build here.
    if args.shell:
        sdk.start_subshell()
        return

    # --only-scripts stops the build here.
    if args.only_scripts:
        install_scripts(args.install_root)
        return

    # Build
    build(plan, layout, args.debug, args.profile)
    merge(layout)
    install_scripts(args.install_root)
Exemplo n.º 4
0
def main():
    args = parse_command_line()

    # Prepare the build plan
    # plan :: (component_name, build_function, abs_source_directory_path)
    plan = []

    def add_to_plan(plan, component_name, build_f, source_directory):
        plan.append((component_name, build_f, source_directory))

    add_to_plan(plan, 'icu', build_icu, args.with_icu_sources)
    add_to_plan(plan, 'qt', build_qt, args.with_qt_sources)
    add_to_plan(plan, 'sip', build_sip, args.with_sip_sources)
    add_to_plan(plan, 'pyqt', build_pyqt, args.with_pyqt_sources)

    # If user specified some packages on the command line, build only those
    if args.packages != 'all':
        plan = [entry for entry in plan if entry[0] in args.packages]

    # Get this installation's layout
    layout = sdk.get_layout(sdk.platform_root(args.install_root))

    # Setup build environment
    prep(layout)

    # --only-merge stops the build here.
    if args.only_merge:
        merge(layout)
        return

    # --shell stops the build here.
    if args.shell:
        sdk.start_subshell()
        return

    # --only-scripts stops the build here.
    if args.only_scripts:
        install_scripts(args.install_root)
        return

    # Build
    build(plan, layout, args.debug, args.profile)
    merge(layout)
    install_scripts(args.install_root)