def make_setuptools_shim_args(
    setup_py_path,  # type: str
    global_options=None,  # type: Sequence[str]
    no_user_config=False,  # type: bool
    unbuffered_output=False  # type: bool
):
    # type: (...) -> List[str]
    """
    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    """
    args = [sys.executable]
    if unbuffered_output:
        args += ["-u"]

    from pip._vendor.packaging import markers
    chaquopy_monkey = (
        "import chaquopy_monkey; chaquopy_monkey.disable_native()"
        if markers.python_version_info  # We're not a recursive PEP517 pip instance.
        else "pass"
    )
    args.extend(['-c', _SETUPTOOLS_SHIM.format(setup_py_path,
                                               chaquopy_monkey=chaquopy_monkey)])

    if global_options:
        args += global_options
    if no_user_config:
        args += ["--no-user-cfg"]
    return args

    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    
product/gradle-plugin/src/main/python/pip/_internal/utils/setuptools_build.py