add snappy-computop - #5815
Conversation
|
This is a port of SnapPy to emscripten-forge. I am not very familiar with packing python and cpp mixed packages and also unfamiliar with using it in a website. @mkoeppe Hello. SnapPy is included in sagemath as an extra package. Does passagemath include SnapPy so that it could run as a static website? |
|
The file lib/python3.13/site-packages/snappy/CyOpenGL.cpython-313-wasm32-emscripten.so seems missing on github CI build. I guess this is because github action environment does not include opengl. |
|
@wangyenshu I have a fork of SnapPy that adds support for running on top of the needed modularized distributions of passagemath. I need to go back to updating it for the latest SnapPy. |
|
Generally, if you are looking to make packages depending on the Sage library work on Wasm, I have numerous forks of curated packages: https://github.com/orgs/passagemath/repositories?type=all&q=passagemath-pkg+sort%3Aname-asc |
|
Thanks. Also the gui for SnapPy uses tkinter. I wonder if it is possible to port the gui to WebAssembly. |
|
@culler or the other authors can comment whether there are plans to change the GUI to something that works in Jupyter notebooks or whether they would accept contributions that do that |
|
I tried to load SnapPy by pyodide, but I get I guess its dependencies are not yet put to pyodide recipe. I am using this frontend: index.html and this build script build.sh. |
|
@wangyenshu https://pypi.org/project/PyX/#files only has a source distribution; for pyodide to install it using micropip, the maintainers would have to upload a (platform-independent) wheel file to PyPI. The pyodide folks don't like to add recipes for pure Python packages. |
|
I find this in its setup.py: That is a lot of dependencies. |
|
Many of these dependencies have not yet been ported to emscripten-forge. But why the build is successful? |
|
All pure Python packages without compiled code are taken directly from conda-forge if a noarch package is available there. |
|
Let's try if it works. @mkoeppe Could you contribute a recipe that enable snappy to run in passagemath? |
Template A: Checklist for adding a package
Pre-submission Checks
emscripten-wasm32platform (not a noarch package), in other words, the package requires compilation.Recipe Structure
Added
recipes/recipes_emscripten/[package-name]/recipe.yamlwith proper structure:contextsection withversion(and optionallyname)packagesection with name and version using Jinja2 templatessourcesection with:.tar.gz,.tar.bz2,.tar.xz,.tgz, or.zip)${{ version }}template for version updatescurl -sL <url> | sha256sum)[package-name]/patches/directorybuildsection with appropriate script/method${PYTHON} -m pip install . ${PIP_ARGS}$R CMD INSTALL $R_ARGS .emcmake/emmakeoremconfigure/emmakerust-nightlyandmaturinor appropriate Rust build toolrequirementssection (build, host, run as needed)testssectiontest_import_[package].pyfile created and referencedaboutsection with license, homepage, summaryPR Formatting
Add [package-name]orUpdate [package-name] to [version]Package Details
Build Notes