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)
dataset/ETHPy150Open develersrl/qt-pyqt-sdk-builder/build.py/main/original