def METHOD_NAME(cls, values: dict[str, Any]) -> dict[str, Any]:
    """Check that if sources is a wheel it shouldn't have host dependencies."""
    if "source" not in values:
        raise ValueError(
            'either "path" or "url" must be provided in the "source" section'
        )
    source_url = values["source"].url
    requirements_host = values["requirements"].host
    if source_url is not None and source_url.endswith(".whl"):
        if len(requirements_host):
            raise ValueError(
                f"When source -> url is a wheel ({source_url}) the package cannot have host "
                f"dependencies. Found {requirements_host}"
            )
        allowed_keys = {
            "post",
            "unvendor-tests",
            # Note here names are with "_", after alias conversion
            "cross_build_env",
            "cross_build_files",
            "exports",
            "unvendor_tests",
            "package_type",
        }
        for key, val in values["build"].dict().items():
            if val and key not in allowed_keys:
                raise ValueError(
                    f"If source is a wheel, 'build/{key}' key is not allowed"
                )
    return values