fix: pass wheel filename through extraction chain to fix micropip install

micropip requires the full PEP 427 wheel filename (name-version-py-abi-plat.whl)
— writing the file as bincio.whl caused InvalidWheelFilename. The wheel URL from
/api/wheel/version now provides the basename; it flows through fetchWheelBase64 →
extractFile → WebView where the file is written with the correct name and
_wheel_path is set as a Pyodide global before PY_INSTALL_WHEEL runs.
This commit is contained in:
Davide Scaini
2026-04-25 09:29:33 +02:00
parent ef45d4f4bb
commit 69571c1306
3 changed files with 23 additions and 13 deletions
+2 -1
View File
@@ -60,6 +60,7 @@ export function extractFile(
filename: string,
base64: string,
wheelBase64: string,
wheelFilename: string,
onStatus: (msg: string) => void = () => {},
): Promise<ExtractionResult> {
if (isExtracting) return Promise.reject(new Error('Another extraction is already in progress'));
@@ -69,7 +70,7 @@ export function extractFile(
isExtracting = true;
const reqId = String(++reqCounter);
const args = JSON.stringify({ reqId, filename, base64, wheelBase64 });
const args = JSON.stringify({ reqId, filename, base64, wheelBase64, wheelFilename });
return new Promise<ExtractionResult>((resolve, reject) => {
pending.set(reqId, {