Skip to content

Commit 900dabb

Browse files
committed
handle sdist
1 parent 9a79332 commit 900dabb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/private/pypi/parse_requirements.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,10 @@ def _add_dists(*, requirement, index_urls, logger = None):
304304
yanked = False,
305305
)
306306

307-
# TODO should be able to handle sdist by checking the filename extension
308-
return [direct_url_dist], None
307+
if filename.endswith(".whl"):
308+
return [direct_url_dist], None
309+
else:
310+
return None, direct_url_dist
309311

310312
if not index_urls:
311313
return [], None

0 commit comments

Comments
 (0)