Skip to content

Release src/js as a npm package#1762

Merged
rth merged 4 commits intopyodide:mainfrom
rth:npm-release
Jul 31, 2021
Merged

Release src/js as a npm package#1762
rth merged 4 commits intopyodide:mainfrom
rth:npm-release

Conversation

@rth
Copy link
Copy Markdown
Member

@rth rth commented Jul 30, 2021

Changes to be able to release of src/js as a standalone NPM package (https://www.npmjs.com/package/pyodide).

Closes #328
xref: #14

Will add more documentation for using Pyodide in Node (#1725) in a follow up PR.

*/

import { Module } from "../js/module.js";
import { Module } from "./module.js";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will mess up the PyProxy API docs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can make a symlink pyproxy.js ==> ../core/pyproxy.gen.js.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the output it doesn't seem to be messed up so I guess this change is fine by itself.

Comment on lines +7 to +9
Download and extract Pyodide packages from [Github
releases](https://github.com/pyodide/pyodide/releases)
(`pyodide-build-*.tar.bz2`). The version of the release needs to match exactly the version of this package.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to simplify this by copying the build directory into src/js in the prepublish script.

Copy link
Copy Markdown
Member Author

@rth rth Jul 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we need to simplify it, but as discussed in #14 (comment) I'm not convinced that bundling all packages is the solution. We need a solution that would also work for micropip installed packages anyway.

So I'm planning to add some local caching next and support remote CDN in node so there is no difference between browser and node usage when starting Pyodide.

@rth
Copy link
Copy Markdown
Member Author

rth commented Jul 31, 2021

Merging. We can improve this in follow up PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm package for pyodide

2 participants