Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit 87a9ff8

Browse files
committed
fix: convert empty index_urls list to None for micropip
micropip treats empty list [] differently from None - with [] it doesn't fall back to PyPI. Using 'index_urls or None' ensures empty lists are converted to None so PyPI fallback works correctly.
1 parent 229bf33 commit 87a9ff8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build/prepare_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def prepare_env(dependencies: list[str] | None, index_urls: list[str] | No
3939

4040
with _micropip_logging() as logs_filename:
4141
try:
42-
await micropip.install(dependencies, keep_going=True, index_urls=index_urls)
42+
await micropip.install(dependencies, keep_going=True, index_urls=index_urls or None)
4343
importlib.invalidate_caches()
4444
except Exception:
4545
with open(logs_filename) as f:

0 commit comments

Comments
 (0)