@jupyterlite/pyodide-kernel-extension 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -33,6 +33,12 @@ const kernel = {
33
33
  const rawPipUrls = config.pipliteUrls || [];
34
34
  const pipliteUrls = rawPipUrls.map((pipUrl) => URLExt.parse(pipUrl).href);
35
35
  const disablePyPIFallback = !!config.disablePyPIFallback;
36
+ const loadPyodideOptions = config.loadPyodideOptions || {};
37
+ for (const [key, value] of Object.entries(loadPyodideOptions)) {
38
+ if (key.endsWith('URL') && typeof value === 'string') {
39
+ loadPyodideOptions[key] = URLExt.parse(key).href;
40
+ }
41
+ }
36
42
  kernelspecs.register({
37
43
  spec: {
38
44
  name: 'python',
@@ -60,6 +66,7 @@ const kernel = {
60
66
  pipliteUrls,
61
67
  disablePyPIFallback,
62
68
  mountDrive,
69
+ loadPyodideOptions,
63
70
  });
64
71
  },
65
72
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlite/pyodide-kernel-extension",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "JupyterLite - Pyodide Kernel Extension",
5
5
  "homepage": "https://github.com/jupyterlite/pyodide-kernel",
6
6
  "bugs": {
@@ -47,14 +47,14 @@
47
47
  "watch:labextension": "jupyter labextension watch ."
48
48
  },
49
49
  "dependencies": {
50
- "@jupyterlab/coreutils": "^6.0.6",
51
- "@jupyterlite/contents": "^0.2.0",
52
- "@jupyterlite/kernel": "^0.2.0",
53
- "@jupyterlite/pyodide-kernel": "^0.2.3",
54
- "@jupyterlite/server": "^0.2.0"
50
+ "@jupyterlab/coreutils": "^6.1.1",
51
+ "@jupyterlite/contents": "^0.3.0",
52
+ "@jupyterlite/kernel": "^0.3.0",
53
+ "@jupyterlite/pyodide-kernel": "^0.3.0",
54
+ "@jupyterlite/server": "^0.3.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@jupyterlab/builder": "~4.0.7",
57
+ "@jupyterlab/builder": "~4.1.1",
58
58
  "rimraf": "^5.0.1",
59
59
  "typescript": "~5.2.2"
60
60
  },
@@ -24,6 +24,19 @@
24
24
  },
25
25
  "default": [],
26
26
  "format": "uri"
27
+ },
28
+ "loadPyodideOptions": {
29
+ "type": "object",
30
+ "description": "additional options to provide to `loadPyodide`, see https://pyodide.org/en/stable/usage/api/js-api.html#globalThis.loadPyodide",
31
+ "default": {},
32
+ "properties": {
33
+ "packages": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ }
38
+ }
39
+ }
27
40
  }
28
41
  }
29
42
  }