def _parse_options_from_cmd_args(args):
    """
    Parse out build options from the command line.

    Args:
        args (Argparse obj):        The output of 'ArgumentParser.parse_args()'

    Returns:
        dict of options.
    """

    opts = {}
    if args.name is not None:
        opts['app_name'] = args.name

    if args.entry_point is not None:
        opts['entry_point'] = args.entry_point

    if args.requirements is not None:
        # Check if we're given a file.
        if args.requirements.startswith('@'):
            opts['requirements_txt'] = args.requirements
        else:
            # Try and break it apart.
            opts['requirements'] = args.requirements.split(',')

    if args.ignore is not None:
        opts['ignore'] = args.ignore.split(',')

    if args.leave_pyc:
        opts['clean_pyc'] = False

    if args.python_shebang:
        opts['python_shebang'] = args.python_shebang

    return opts