Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pyodide/wasm support: pure-Python wheel, worker transport, GlowScript host factory #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Pyodide/wasm support: pure-Python wheel, worker transport, GlowScript host factory #291
Changes from 1 commit
3c06704b64d142ae16fc758c22ff379672f3772014502d6f80a6ddbe393c1d647875afec6d59d68eff8c2504893c8fd10a77521bb6c357e6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Two changes that together let `vpython` be installed and imported under Pyodide/wasm. Both are opt-in or invisible to existing users: an ordinary `python -m build` still produces the same platform wheel it always did, and `install_requires` is untouched. 1. `VPYTHON_PURE_PYTHON=1` builds with no C extension, producing a `py3-none-any` wheel. micropip (and any other wasm installer) cannot install a platform wheel, and merely DECLARING `ext_modules` is what makes every wheel a platform wheel — so the key is now omitted entirely for that build rather than set to an empty list, which would not have changed the tag. Nothing is lost but speed: `_vector_import_helper` already falls back to the pure-Python `vector` when `cyvector` is unavailable. 2. `vpython/__init__.py` uses `importlib.metadata` instead of `pkg_resources`. pkg_resources is deprecated upstream and simply absent in Pyodide, so importing vpython there failed on the package's very first line. `python_requires` moves to >=3.8 accordingly (importlib.metadata is 3.8+; `notebook>=7` already required 3.8+, so this narrows nothing in practice). Verified in a real Pyodide 3.13.2 Web Worker, installing this branch's own pure wheel with `deps=False` and no setuptools present: OK vpython.vector OK vpython.vpython PACKAGE OK __version__ = 7.6.5 __gs_version__ = 3.2 `__gs_version__` resolving also confirms `gs_version.py` reads the bundled glow.min.js fine there, and that it is on the same 3.2 line trinket serves. Both builds were checked: with the flag, `vpython-7.6.5-py3-none-any.whl`; without it, `vpython-7.6.5-cp314-cp314-macosx_10_15_universal2.whl` as before. Execution now reaches the transport seam — `sphere()` stops at vpython.py:267 `from .no_notebook import _` (autobahn), which is the next piece of work, not a packaging problem.Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing