mirror of https://github.com/pyodide/pyodide.git
Release 0.17.0a2 (#1356)
This commit is contained in:
parent
3163ef8dd6
commit
afb522ed59
|
@ -7,7 +7,7 @@ defaults: &defaults
|
|||
environment:
|
||||
- EMSDK_NUM_CORES: 4
|
||||
EMCC_CORES: 4
|
||||
PYODIDE_BASE_URL: https://cdn.jsdelivr.net/pyodide/dev/full/
|
||||
PYODIDE_BASE_URL: https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
|
|
@ -23,7 +23,7 @@ browser**.
|
|||
|
||||
## Try Pyodide (no installation needed)
|
||||
|
||||
Try pyodide in [Python REPL](https://pyodide-cdn2.iodide.io/v0.16.1/full/console.html) directly in your
|
||||
Try pyodide in [Python REPL](https://pyodide-cdn2.iodide.io/v0.17.0a2/full/console.html) directly in your
|
||||
browser.
|
||||
|
||||
For further information, look through the [documentation](https://pyodide.org/).
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Only the Python standard library is available after importing Pyodide.
|
||||
To use other packages, you’ll need to load them using either:
|
||||
- {any}`pyodide.loadPackage` for packages built with Pyodide, or
|
||||
- {any}`pyodide.loadPackage` for packages built with Pyodide, or
|
||||
- {any}`micropip.install` for pure Python packages with wheels available on PyPi or
|
||||
from other URLs.
|
||||
|
||||
|
@ -13,8 +13,8 @@ which case it relies on {any}`pyodide.loadPackage`).
|
|||
```
|
||||
|
||||
Alternatively you can run Python code without manually pre-loading packages.
|
||||
You can do this with {any}`pyodide.runPythonAsync`
|
||||
which will automatically download all packages that the code snippet imports.
|
||||
You can do this with {any}`pyodide.runPythonAsync`
|
||||
which will automatically download all packages that the code snippet imports.
|
||||
It only supports packages included in Pyodide (not on PyPi) at present.
|
||||
|
||||
## Loading packages with {any}`pyodide.loadPackage`
|
||||
|
@ -113,9 +113,9 @@ a complete example would be,
|
|||
<body>
|
||||
<script type="text/javascript">
|
||||
// set the Pyodide files URL (packages.json, pyodide.asm.data etc)
|
||||
window.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.16.1/full/';
|
||||
window.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/';
|
||||
</script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/pyodide.js"></script>
|
||||
<script type="text/javascript">
|
||||
pythonCode = `
|
||||
def do_work(*args):
|
||||
|
|
|
@ -8,7 +8,7 @@ This document describes using Pyodide directly from Javascript.
|
|||
|
||||
To include Pyodide in your project you can use the following CDN URL,
|
||||
|
||||
https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.js
|
||||
https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/pyodide.js
|
||||
|
||||
You can also download a release from
|
||||
[Github releases](https://github.com/iodide-project/pyodide/releases)
|
||||
|
@ -55,9 +55,9 @@ Create and save a test `index.html` page with the following contents:
|
|||
<head>
|
||||
<script type="text/javascript">
|
||||
// set the Pyodide files URL (packages.json, pyodide.asm.data etc)
|
||||
window.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.16.1/full/';
|
||||
window.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/';
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/pyodide.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
Pyodide test page <br>
|
||||
|
@ -83,9 +83,9 @@ Create and save a test `index.html` page with the following contents:
|
|||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
window.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.16.1/full/';
|
||||
window.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/';
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/pyodide.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -103,8 +103,8 @@ lines `pythonLoading = self.pyodide.loadPackage(['numpy', 'pytz'])` and
|
|||
// Setup your project to serve `py-worker.js`. You should also serve
|
||||
// `pyodide.js`, and all its associated `.asm.js`, `.data`, `.json`,
|
||||
// and `.wasm` files as well:
|
||||
self.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.16.1/full/';
|
||||
importScripts('https://cdn.jsdelivr.net/pyodide/v0.16.1/full/pyodide.js');
|
||||
self.languagePluginUrl = 'https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/';
|
||||
importScripts('https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/pyodide.js');
|
||||
|
||||
let pythonLoading;
|
||||
async function loadPythonPackages(){
|
||||
|
|
|
@ -27,7 +27,7 @@ function error() {
|
|||
|
||||
|
||||
PYODIDE_IMAGE_TAG="12"
|
||||
PYODIDE_PREBUILT_IMAGE_TAG="0.16.1"
|
||||
PYODIDE_PREBUILT_IMAGE_TAG="0.17.0a2"
|
||||
DEFAULT_PYODIDE_DOCKER_IMAGE="iodide/pyodide-env:${PYODIDE_IMAGE_TAG}"
|
||||
DEFAULT_PYODIDE_SYSTEM_PORT="8000"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ if platform.system() == "Emscripten":
|
|||
asyncio.set_event_loop_policy(WebLoopPolicy())
|
||||
|
||||
|
||||
__version__ = "0.17.dev0"
|
||||
__version__ = "0.17.0a2"
|
||||
|
||||
__all__ = [
|
||||
"open_url",
|
||||
|
|
Loading…
Reference in New Issue