Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 9, 2025

Adds a complete recipe for pyxel, a retro game engine for Python, to support WebAssembly environments through emscripten-forge.

Changes Made

  • Recipe Structure: Created complete recipe in recipes/recipes_emscripten/pyxel/ following established patterns
  • Dependencies: Uses Rust toolchain and maturin build system with proper cross-compilation setup
  • Build Process: Includes SDL2 setup for graphics support and WebAssembly compilation
  • Testing: Implements import tests to verify basic pyxel functionality

Package Details

  • Source: GitHub releases tar.gz file for v2.5.4 from https://github.com/kitao/pyxel/archive/refs/tags/v2.5.4.tar.gz
  • Build System: Uses maturin (Rust + Python) following patterns from rustworkx and orjson recipes
  • Requirements: Python ≥3.8, Rust toolchain, SDL2, and emscripten cross-compilation tools
  • Target Platform: emscripten-wasm32 for WebAssembly environments

Files Created

  • recipe.yaml - Package metadata and dependency specifications with URL source and SHA256 hash
  • build.sh - Build script handling SDL2 setup and maturin compilation
  • test_import_pyxel.py - Import verification and basic functionality tests using function definitions

Pyxel already includes WebAssembly support with pre-built emscripten wheels, making it well-suited for emscripten-forge. The recipe enables building pyxel from source for WebAssembly targets.

Fixes #2806.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@IsabelParedes
Copy link
Member

@copilot resume work

Copy link
Contributor Author

Copilot AI commented Sep 10, 2025

@copilot resume work

I've resumed work on the pyxel recipe for emscripten-forge. I've completed the initial implementation with commit 944e9e2:

What I've done:

  • Researched pyxel - it's a retro game engine for Python built with Rust and maturin
  • Confirmed it has WebAssembly support (includes pre-built emscripten wheels)
  • Created complete recipe following emscripten-forge patterns:
    • recipe.yaml with proper metadata and Rust/maturin dependencies
    • build.sh script that builds SDL2 and uses maturin build system
    • Import test for basic functionality verification

The recipe follows the same patterns as other Rust packages in the repo (rustworkx, orjson) and is ready for testing with the full emscripten-forge channel.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.prefix.dev
    • Triggering command: /home/REDACTED/work/recipes/recipes/.pixi/envs/default/bin/rattler-build build --package-format tar-bz2 -c REDACTED -c microsoft -c conda-forge --target-platform emscripten-wasm32 --skip-existing none -m variant.yaml --recipe recipes/recipes_emscripten/pyxel (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] pyxel Add pyxel recipe for emscripten-forge Sep 10, 2025
Copilot AI requested a review from IsabelParedes September 10, 2025 11:27
Copilot finished work on behalf of IsabelParedes September 10, 2025 11:27
@IsabelParedes IsabelParedes dismissed a stale review September 10, 2025 11:49

Formatting

Copy link
Member

@IsabelParedes IsabelParedes left a comment

Choose a reason for hiding this comment

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

@copilot make changes

Copy link
Contributor Author

Copilot AI commented Sep 10, 2025

@copilot make changes

Made the requested changes in commit 3408ef4:

  1. Changed source from git branch to URL tar file with SHA256 hash
  2. Refactored tests to use function definitions instead of global scope code

The pyxel recipe now follows the established patterns for both source handling and test structure.

Copilot finished work on behalf of IsabelParedes September 10, 2025 11:55
Copilot AI requested a review from IsabelParedes September 10, 2025 11:55
Copilot AI and others added 2 commits September 17, 2025 12:04
Co-authored-by: IsabelParedes <23283243+IsabelParedes@users.noreply.github.com>
Co-authored-by: IsabelParedes <23283243+IsabelParedes@users.noreply.github.com>
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.

pyxel

2 participants