def _parse_setuptools_arguments(setup_attrs):
    "This function instantiates a Distribution object and\n    parses the command line arguments.\n\n    It returns the tuple ``(display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name)``\n    where\n\n    - display_only is a boolean indicating if an argument like '--help',\n      '--help-commands' or '--author' was passed.\n    - help_commands is a boolean indicating if argument '--help-commands'\n      was passed.\n    - commands contains the list of commands that were passed.\n    - hide_listing is a boolean indicating if the list of files being included\n      in the distribution is displayed or not.\n    - force_cmake a boolean indicating that CMake should always be executed.\n    - skip_cmake is a boolean indicating if the execution of CMake should\n      explicitly be skipped.\n    - plat_name is a string identifying the platform name to embed in generated\n      filenames. It defaults to :func:`skbuild.constants.skbuild_plat_name()`.\n    - build_ext_inplace is a boolean indicating if ``build_ext`` command was\n      specified along with the --inplace argument.\n\n    Otherwise it raises DistutilsArgError exception if there are\n    any error on the command-line, and it raises DistutilsGetoptError\n    if there any error in the command 'options' attribute.\n\n    The code has been adapted from the setup() function available\n    in distutils/core.py.\n    "
    setup_attrs = dict(setup_attrs)
    setup_attrs['script_name'] = os.path.basename(sys.argv[0])
    dist = upstream_Distribution(setup_attrs)
    upstream_Distribution.global_options.extend([('hide-listing', None, 'do not display list of files being included in the distribution'), ('force-cmake', None, 'always run CMake'), ('skip-cmake', None, 'do not run CMake')])
    dist.parse_config_files()
    with _capture_output():
        result = dist.parse_command_line()
        display_only = (not result)
        if (not hasattr(dist, 'hide_listing')):
            dist.hide_listing = False
        if (not hasattr(dist, 'force_cmake')):
            dist.force_cmake = False
        if (not hasattr(dist, 'skip_cmake')):
            dist.skip_cmake = False
    plat_names = set()
    for cmd in [dist.get_command_obj(command) for command in dist.commands]:
        if (getattr(cmd, 'plat_name', None) is not None):
            plat_names.add(cmd.plat_name)
    if (not plat_names):
        plat_names.add(None)
    elif (len(plat_names) > 1):
        raise SKBuildError(('--plat-name is ambiguous: %s' % ', '.join(plat_names)))
    plat_name = list(plat_names)[0]
    build_ext_inplace = dist.get_command_obj('build_ext').inplace
    return (display_only, dist.help_commands, dist.commands, dist.hide_listing, dist.force_cmake, dist.skip_cmake, plat_name, build_ext_inplace)
This function instantiates a Distribution object and
parses the command line arguments.

It returns the tuple ``(display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name)``
where

- display_only is a boolean indicating if an argument like '--help',
  '--help-commands' or '--author' was passed.
- help_commands is a boolean indicating if argument '--help-commands'
  was passed.
- commands contains the list of commands that were passed.
- hide_listing is a boolean indicating if the list of files being included
  in the distribution is displayed or not.
- force_cmake a boolean indicating that CMake should always be executed.
- skip_cmake is a boolean indicating if the execution of CMake should
  explicitly be skipped.
- plat_name is a string identifying the platform name to embed in generated
  filenames. It defaults to :func:`skbuild.constants.skbuild_plat_name()`.
- build_ext_inplace is a boolean indicating if ``build_ext`` command was
  specified along with the --inplace argument.

Otherwise it raises DistutilsArgError exception if there are
any error on the command-line, and it raises DistutilsGetoptError
if there any error in the command 'options' attribute.

The code has been adapted from the setup() function available
in distutils/core.py.
def _parse_setuptools_arguments(setup_attrs):
    "This function instantiates a Distribution object and\n    parses the command line arguments.\n\n    It returns the tuple ``(display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name)``\n    where\n\n    - display_only is a boolean indicating if an argument like '--help',\n      '--help-commands' or '--author' was passed.\n    - help_commands is a boolean indicating if argument '--help-commands'\n      was passed.\n    - commands contains the list of commands that were passed.\n    - hide_listing is a boolean indicating if the list of files being included\n      in the distribution is displayed or not.\n    - force_cmake a boolean indicating that CMake should always be executed.\n    - skip_cmake is a boolean indicating if the execution of CMake should\n      explicitly be skipped.\n    - plat_name is a string identifying the platform name to embed in generated\n      filenames. It defaults to :func:`skbuild.constants.skbuild_plat_name()`.\n    - build_ext_inplace is a boolean indicating if ``build_ext`` command was\n      specified along with the --inplace argument.\n\n    Otherwise it raises DistutilsArgError exception if there are\n    any error on the command-line, and it raises DistutilsGetoptError\n    if there any error in the command 'options' attribute.\n\n    The code has been adapted from the setup() function available\n    in distutils/core.py.\n    "
    setup_attrs = dict(setup_attrs)
    setup_attrs['script_name'] = os.path.basename(sys.argv[0])
    dist = upstream_Distribution(setup_attrs)
    upstream_Distribution.global_options.extend([('hide-listing', None, 'do not display list of files being included in the distribution'), ('force-cmake', None, 'always run CMake'), ('skip-cmake', None, 'do not run CMake')])
    dist.parse_config_files()
    with _capture_output():
        result = dist.parse_command_line()
        display_only = (not result)
        if (not hasattr(dist, 'hide_listing')):
            dist.hide_listing = False
        if (not hasattr(dist, 'force_cmake')):
            dist.force_cmake = False
        if (not hasattr(dist, 'skip_cmake')):
            dist.skip_cmake = False
    plat_names = set()
    for cmd in [dist.get_command_obj(command) for command in dist.commands]:
        if (getattr(cmd, 'plat_name', None) is not None):
            plat_names.add(cmd.plat_name)
    if (not plat_names):
        plat_names.add(None)
    elif (len(plat_names) > 1):
        raise SKBuildError(('--plat-name is ambiguous: %s' % ', '.join(plat_names)))
    plat_name = list(plat_names)[0]
    build_ext_inplace = dist.get_command_obj('build_ext').inplace
    return (display_only, dist.help_commands, dist.commands, dist.hide_listing, dist.force_cmake, dist.skip_cmake, plat_name, build_ext_inplace)