Skip to content

add snappy-computop#5815

Open
wangyenshu wants to merge 3 commits into
emscripten-forge:mainfrom
wangyenshu:snappy-computop
Open

add snappy-computop#5815
wangyenshu wants to merge 3 commits into
emscripten-forge:mainfrom
wangyenshu:snappy-computop

Conversation

@wangyenshu

Copy link
Copy Markdown
Contributor

Template A: Checklist for adding a package

Pre-submission Checks

  • Package requires building for emscripten-wasm32 platform (not a noarch package), in other words, the package requires compilation.

Recipe Structure

Added recipes/recipes_emscripten/[package-name]/recipe.yaml with proper structure:

  • context section with version (and optionally name)
  • package section with name and version using Jinja2 templates
  • source section with:
    • Source URL is valid and points to archive file (.tar.gz, .tar.bz2, .tar.xz, .tgz, or .zip)
    • Source URL contains ${{ version }} template for version updates
    • SHA256 hash is correct (verified with curl -sL <url> | sha256sum)
    • Patches (if any) are included in [package-name]/patches/ directory
  • build section with appropriate script/method
    • Python packages: ${PYTHON} -m pip install . ${PIP_ARGS}
    • R packages: $R CMD INSTALL $R_ARGS .
    • C++ packages: Uses emcmake/emmake or emconfigure/emmake
    • Rust packages: Uses rust-nightly and maturin or appropriate Rust build tool
    • Build number is 0
    • If the script is longer than 3 lines, a build.sh is included
  • requirements section (build, host, run as needed)
  • tests section
    • Python packages: test_import_[package].py file created and referenced
    • C++ packages: Test executable or package_contents test
    • R packages: Package contents test
  • about section with license, homepage, summary

PR Formatting

  • PR title follows format: Add [package-name] or Update [package-name] to [version]
  • PR description includes:
    • Version being added/updated
    • Any special build considerations or patches applied

Package Details

  • Package Name: snappy-computop
  • Version: 3.3.2

Build Notes

@wangyenshu

Copy link
Copy Markdown
Contributor Author

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?

@wangyenshu

Copy link
Copy Markdown
Contributor Author

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.

@mkoeppe

mkoeppe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@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.

@mkoeppe

mkoeppe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

@wangyenshu

wangyenshu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Also the gui for SnapPy uses tkinter. I wonder if it is possible to port the gui to WebAssembly.

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.

2 participants