Skip to content

Commit 0c5c82f

Browse files
committed
feat: Add indication that installation completed
It was pointed out on Discord that the current message approach makes it look like the last installation has hung
1 parent 6145f24 commit 0c5c82f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hooks/usePyodide.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,11 @@ 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"\\nInstalling {req} ...", end=" ", flush=True)
415416
# Install package req without extras, which we handle ourselves
416417
# because micropip.install() doesn't actually install extras
417418
await micropip.install(re.sub(r"\\[[^\\]]*\\]", "", req))
419+
print("done.", flush=True)
418420
419421
if len(extras) == 0:
420422
continue
@@ -447,8 +449,9 @@ async def _install_requirements_from_dir(dir: str) -> None:
447449
for extra_req in extra_reqs:
448450
extra_req_name = re.sub(r"([a-zA-Z0-9._,-]+)(.*)", r"\\1", extra_req).strip()
449451
if extra_req_name not in micropip.list():
450-
print(f"Installing {extra_req_name} for {pkg_name}[{extra}]")
452+
print(f"\\nInstalling {extra_req_name} for {pkg_name}[{extra}] ...", end=" ", flush = True)
451453
await micropip.install(extra_req_name)
454+
print("done.", flush = True)
452455
453456
454457
async def _load_packages_from_dir(dir: str) -> None:

0 commit comments

Comments
 (0)