Commit 2aa98eb6 authored by Roman Yurchak's avatar Roman Yurchak

Document loading packages from custom URLs

parent 11fcaf8d
......@@ -50,7 +50,8 @@ The supported keys in the `meta.yaml` file are described below.
The name of the package. It must match the name of the package used when
expanding the tarball, which is sometimes different from the name of the package
in the Python namespace when installed. It must also match the name of the
directory in which the `meta.yaml` file is placed.
directory in which the `meta.yaml` file is placed. It can only contain
alpha-numeric characters and `-`, `_`.
#### `package/version`
......
......@@ -51,7 +51,15 @@ Pyodide. To use other libraries, you'll need to load their package using
from a Javascript cell. This downloads the file data over the network (as a
`.data` and `.js` index file) and installs the files in the virtual filesystem.
When you request a package, all of that package's dependencies are also loaded.
Packages can be loaded by name, for those included in the official pyodide
repository (e.g. `pyodide.loadPackage('numpy')`). It is also possible to load
packages from custom URLs (e.g.
`pyodide.loadPackage('https://foo/bar/numpy.js')`), in which case the URL must
end with `<package-name>.js`.
When you request a package from the official repository, all of that package's
dependencies are also loaded. Dependency resolution is not yet implemented
when loading packages from custom URLs.
`pyodide.loadPackage` returns a `Promise`.
......
......@@ -39,7 +39,15 @@ Pyodide. To use other libraries, you'll need to load their package using
`pyodide.loadPackage`. This downloads the file data over the network (as a
`.data` and `.js` index file) and installs the files in the virtual filesystem.
When you request a package, all of that package's dependencies are also loaded.
Packages can be loaded by name, for those included in the official pyodide
repository (e.g. `pyodide.loadPackage('numpy')`). It is also possible to load
packages from custom URLs (e.g.
`pyodide.loadPackage('https://foo/bar/numpy.js')`), in which case the URL must
end with `<package-name>.js`.
When you request a package from the official repository, all of that package's
dependencies are also loaded. Dependency resolution is not yet implemented
when loading packages from custom URLs.
`pyodide.loadPackage` returns a `Promise`.
......
......@@ -67,7 +67,7 @@ var languagePluginLoader = new Promise((resolve, reject) => {
}
});
} else {
log.console(`Unknown package '${package}'`);
console.log(`Unknown package '${package}'`);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment