Skip to content

Commit 4a7116c

Browse files
Add a TS fix
1 parent d2192fe commit 4a7116c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/pyodide-kernel/src/worker.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,20 @@ export class PyodideRemoteKernel {
9595
' "pre": False,',
9696
' "verbose": False,',
9797
'}',
98-
`piplite.piplite._PIPLITE_INTERNAL_FLAGS = {"disable_pypi": ${disablePyPIFallback ? 'True' : 'False'}}`,
9998
`piplite.piplite._PIPLITE_URLS = ${JSON.stringify(pipliteUrls)}`,
99+
`piplite.piplite._PIPLITE_INTERNAL_FLAGS = {"disable_pypi": ${disablePyPIFallback ? 'True' : 'False'}}`,
100100
];
101101

102+
if (pipliteInstallDefaultOptions) {
103+
for (const [key, value] of Object.entries(pipliteInstallDefaultOptions)) {
104+
if (value !== undefined) {
105+
pythonConfig.push(
106+
`piplite.piplite._PIPLITE_DEFAULT_INSTALL_ARGS["${key}"] = ${JSON.stringify(value)}`,
107+
);
108+
}
109+
}
110+
}
111+
102112
// get piplite early enough to impact pyodide-kernel dependencies
103113
await this._pyodide.runPythonAsync(pythonConfig.join('\n'));
104114
}

0 commit comments

Comments
 (0)