mirror of https://github.com/pyodide/pyodide.git
parent
67678a6c7f
commit
5b405767f9
|
@ -1,4 +1,3 @@
|
|||
import time
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -14,7 +13,6 @@ def selenium_standalone_micropip(selenium_standalone):
|
|||
"""
|
||||
selenium_standalone.run_js(
|
||||
"""
|
||||
await languagePluginLoader;
|
||||
await pyodide.loadPackage("micropip");
|
||||
await pyodide.runPythonAsync("import micropip");
|
||||
"""
|
||||
|
|
|
@ -33,7 +33,12 @@ globalThis.loadPyodide = async function(config = {}) {
|
|||
// in this template in the Makefile. It's recommended to always set
|
||||
// indexURL in any case.
|
||||
let baseURL = config.indexURL || "{{ PYODIDE_BASE_URL }}";
|
||||
baseURL = baseURL.substr(0, baseURL.lastIndexOf('/')) + '/';
|
||||
if (baseURL.endsWith(".js")) {
|
||||
baseURL = baseURL.substr(0, baseURL.lastIndexOf('/'));
|
||||
}
|
||||
if (!baseURL.endsWith("/")) {
|
||||
baseURL += '/';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Package loading
|
||||
|
@ -794,13 +799,14 @@ def temp(Module):
|
|||
|
||||
if (globalThis.languagePluginUrl) {
|
||||
console.warn(
|
||||
"languagePluginUrl is deprecated and will be removed in version 0.18.0," +
|
||||
"languagePluginUrl is deprecated and will be removed in version 0.18.0, " +
|
||||
"instead use loadPyodide({ indexURL : <some_url>})");
|
||||
|
||||
/**
|
||||
* A deprecated parameter that specifies the Pyodide baseURL. If present,
|
||||
* Pyodide will automatically invoke ``initializePyodide({baseURL :
|
||||
* languagePluginUrl})`` and will store the resulting promise in
|
||||
* A deprecated parameter that specifies the Pyodide indexURL. If present,
|
||||
* Pyodide will automatically invoke
|
||||
* ``initializePyodide({indexURL : languagePluginUrl})``
|
||||
* and will store the resulting promise in
|
||||
* :any:`globalThis.languagePluginLoader`. Instead, use :any:`loadPyodide`
|
||||
* directly.
|
||||
*
|
||||
|
@ -818,5 +824,5 @@ if (globalThis.languagePluginUrl) {
|
|||
* @deprecated Will be removed in version 0.18.0
|
||||
*/
|
||||
globalThis.languagePluginLoader =
|
||||
loadPyodide({baseURL : globalThis.languagePluginUrl});
|
||||
loadPyodide({indexURL : globalThis.languagePluginUrl});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue