Skip to content

Commit 43ef6d1

Browse files
committed
fix(uv): strip quotes from CSV wrapped top_level paths
1 parent ce3630a commit 43ef6d1

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

uv/private/whl_install/repository.bzl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ def _extract_wheel_metadata(repository_ctx, whl_label):
8989
path = line.split(",", 1)[0]
9090
if not path:
9191
continue
92+
93+
# Some ass top_level contains
94+
# "functorch/__init__.py",sha256=...,1037
95+
# "torch/__init__.py",sha256=...,12345
96+
# instead of
97+
# functorch/__init__.py,sha256=...,1037
98+
# torch/__init__.py,sha256=...,12345
99+
# which split by / will get a leftover '"torch' and '__init__.py"'
100+
# So if line is from CSV. If a path was wrapped in double quotes
101+
path = path.strip('"')
102+
92103
segments = path.split("/")
93104
first_segment = segments[0]
94105

0 commit comments

Comments
 (0)