diff --git a/python/private/pypi/parse_requirements.bzl b/python/private/pypi/parse_requirements.bzl index bdfac46ed6..e696e605d6 100644 --- a/python/private/pypi/parse_requirements.bzl +++ b/python/private/pypi/parse_requirements.bzl @@ -334,8 +334,8 @@ def _add_dists(*, requirement, index_urls, logger = None): sdist = maybe_sdist continue - if logger: - logger.warn(lambda: "Could not find a whl or an sdist with sha256={}".format(sha256)) + if logger and (len(whls) == 0 and sdist == None): + logger.warn(lambda: "Could not find a whl or an sdist with sha256={} for requirement={}".format(sha256, requirement)) yanked = {} for dist in whls + [sdist]: