Skip to content

Commit

Permalink
some pyodide docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Dec 3, 2021
1 parent 0b3f2f8 commit 80b5d7e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
17 changes: 15 additions & 2 deletions docs/cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@
"| `--federated-extensions` | paths to folders, `pip`/`conda` packages with extensions [see note](#conda-packages) | | |\n",
"| `--ignore-sys-prefix` | don't copy any contents, such as install labextensions, from `sys.prefix` | `False` | |\n",
"| `--settings-overrides` | additional settings overrides to enable | | |\n",
"| `--piplite-wheels` | additional wheels to make available | | |"
"| `--piplite-wheels` | additional wheels to make available | | |\n",
"| `--pyodide` | the path or URL of a pyodide release | | |"
]
},
{
Expand Down Expand Up @@ -751,7 +752,7 @@
"source": [
"### pyolite wheels\n",
"\n",
"_Prebuilt Lab Extension_ developers who wish to include wheels for use with pyolite may use this command to pre-index wheels they wish to distribute. This can be useful if a package needs upstream patches, etc."
"_Prebuilt Lab Extension_ developers who wish to include wheels for use with [pyolite](./kernels/pyolite.md) may use this command to pre-index wheels they wish to distribute. This can be useful if a package needs upstream patches, etc."
]
},
{
Expand All @@ -769,6 +770,18 @@
"!jupyter lite pip index --help"
]
},
{
"cell_type": "markdown",
"id": "49f781c1-3588-4608-a560-318f3507969f",
"metadata": {},
"source": [
"### pyodide\n",
"\n",
"[Pyodide](https://pyodide.org) is a WebAssembly distribution of CPython and powers the [pyolite](./kernels/pyolite.md) kernel. At nearly 200mb, compressed, a full pyodide distribution includes both the Python interpreter and key anchor packages from the scientific computing stack. Parts of it are fetched, as needed, by the user's browser, from the official pyodide CDN.\n",
"\n",
"The `--pyodide` CLI option (and `pyodide_url` config option) allow for fetching either a compressed pyodide `.bz2`, or folder containing such an archive's contents. This might be from the official [pyodide release page](https://github.com/pyodide/pyodide/releases), a nightly or PR asset, or otherwise custom build. Once fetched, it is copied to the output folder, and configured correctly in `jupyter-lite.json`."
]
},
{
"cell_type": "markdown",
"id": "a60ecfe7-0973-4a81-9d0c-d85f9f960d3a",
Expand Down
18 changes: 18 additions & 0 deletions docs/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ Package Index (PyPI). This behavior can be disabled via `jupyter-lite.json`:
}
```

## Pyodide

Beneah custom wheels are the raw JS and WebAssembly parts of `pyolite` provided by
[pyodide](https://pyodide.org). A custom `pyodide.js`, along with its `packages.json`
and the rest of its assets, such as might be downloaded via the
[`--pyodide` CLI option](./cli.ipynb#pyodide), can also be configured. This can be
either relative to the `lite_dir`, or as an absolute path.

```json
"jupyter-config-data": {
"litePluginSettings": {
"@jupyterlite/pyolite-kernel-extension:kernel": {
"pyodideUrl": "./path/to/custom/pyodide/pyodide.js"
}
}
}
```

## LaTeX

Rendering $\LaTeX$ is generally handled in a special way when compared with most other
Expand Down
2 changes: 1 addition & 1 deletion docs/doit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 80b5d7e

Please sign in to comment.