Skip to content

Commit 6145f24

Browse files
committed
fix: strip extras from package req
micropip.install() doesn't install extras but apparently it *acts like it does*.
1 parent 6975f07 commit 6145f24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hooks/usePyodide.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,9 @@ async def _install_requirements_from_dir(dir: str) -> None:
412412
extras.update({e.strip() for e in match_extras.group(2).split(",")})
413413
414414
if pkg_name not in micropip.list():
415-
print(f"Installing {req} ...")
416-
await micropip.install(req)
415+
# Install package req without extras, which we handle ourselves
416+
# because micropip.install() doesn't actually install extras
417+
await micropip.install(re.sub(r"\\[[^\\]]*\\]", "", req))
417418
418419
if len(extras) == 0:
419420
continue

0 commit comments

Comments
 (0)