File tree Expand file tree Collapse file tree 3 files changed +97
-0
lines changed
recipes/recipes_emscripten/pyxel Expand file tree Collapse file tree 3 files changed +97
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ # Build SDL2 for emscripten (required by pyxel)
6+ embuilder build sdl2 --pic
7+
8+ # Set environment variables for maturin and emscripten
9+ export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX} /etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py
10+ export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
11+
12+ # Change to the Python subdirectory where pyproject.toml is located
13+ cd python
14+
15+ # Copy LICENSE file
16+ cp ../LICENSE pyxel/
17+
18+ # Install using pip (which will use maturin via pyproject.toml)
19+ ${PYTHON} -m pip install . -vvv
Original file line number Diff line number Diff line change 1+ context :
2+ name : pyxel
3+ version : " 2.5.4"
4+
5+ package :
6+ name : ${{ name }}
7+ version : ${{ version }}
8+
9+ source :
10+ - git : https://github.com/kitao/pyxel.git
11+ tag : v${{ version }}
12+
13+ build :
14+ number : 0
15+
16+ requirements :
17+ build :
18+ - cross-python_${{ target_platform }}
19+ - ${{ compiler("c") }}
20+ - setuptools-rust
21+ - rust
22+ - rust-src
23+ - maturin
24+ host :
25+ - python
26+ - openssl
27+ run :
28+ - python
29+
30+ tests :
31+ - script : pytester
32+ requirements :
33+ build :
34+ - pytester
35+ run :
36+ - pytester-run
37+ files :
38+ recipe :
39+ - test_import_pyxel.py
40+
41+ about :
42+ summary : A retro game engine for Python
43+ description : |
44+ Pyxel is a retro game engine for Python. Thanks to its simple specifications
45+ inspired by retro gaming consoles, such as only 16 colors can be displayed
46+ and only 4 sounds can be played back at the same time, you can feel free to
47+ enjoy making pixel art style games.
48+ homepage : https://github.com/kitao/pyxel
49+ license : MIT
50+ license_file : LICENSE
51+ repository : https://github.com/kitao/pyxel
52+ documentation : https://github.com/kitao/pyxel
53+
54+ extra :
55+ recipe-maintainers :
56+ - Copilot
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ try :
4+ import pyxel
5+ print ("pyxel import successful" )
6+
7+ # Test basic functionality
8+ print (f"pyxel version: { pyxel .__version__ } " )
9+
10+ # Try to access some basic pyxel attributes
11+ assert hasattr (pyxel , 'init' ), "pyxel.init not found"
12+ assert hasattr (pyxel , 'run' ), "pyxel.run not found"
13+ assert hasattr (pyxel , 'cls' ), "pyxel.cls not found"
14+
15+ print ("All basic pyxel imports and attributes are available" )
16+
17+ except ImportError as e :
18+ print (f"Failed to import pyxel: { e } " )
19+ raise
20+ except Exception as e :
21+ print (f"Error during pyxel testing: { e } " )
22+ raise
You can’t perform that action at this time.
0 commit comments