1010
1111jobs :
1212  build_wheels :
13-     name : ${{ matrix.os }}, Python  ${{ matrix.python }} 
13+     name : ${{ matrix.os }}, ${{matrix.python_impl }}  ${{ matrix.python }} 
1414    runs-on : ${{ matrix.os }} 
1515    defaults :
1616      run :
2020      matrix :
2121        python : [cp39, cp310, cp311, cp312] 
2222        os : [ubuntu-latest, windows-latest, macOS-latest] 
23+         python_impl : [Python] 
24+         include :
25+           - python : cp312 
26+             os : ubuntu-latest 
27+             python_impl : Pyodide 
2328    env :
2429      BUILD_COMMIT : " main" #  or a specific version, e.g., v0.13.1
2530      CIBW_BUILD : ${{ matrix.python }}-* 
3035      CIBW_SKIP : " pp* *-win32 cp38-musllinux* cp39-musllinux* *musllinux_aarch64*" 
3136      CIBW_TEST_REQUIRES : pytest pytest-xdist 
3237      CIBW_TEST_COMMAND : python -c "import statsmodels; statsmodels.test(['--skip-examples','--skip-slow','-n','2'])" 
33-       #  Avoid testing on emulated architectures
34-       CIBW_TEST_SKIP : " *-*linux_{aarch64,ppc64le,s390x}" 
38+       #  Avoid testing on emulated architectures and Pyodide 
39+       CIBW_TEST_SKIP : " *-*linux_{aarch64,ppc64le,s390x} *pyodide* " 
3540      CIBW_REPAIR_WHEEL_COMMAND_LINUX : ' auditwheel repair --strip -w {dest_dir} {wheel}' 
3641      MULTIBUILD_WHEELS_STAGING_ACCESS : ${{ secrets.MULTIBUILD_WHEELS_STAGING_ACCESS }} 
3742      SCIENTIFIC_PYTHON_NIGHTLY_WHEELS : ${{ secrets.SCIENTIFIC_PYTHON_NIGHTLY_WHEELS }} 
@@ -45,25 +50,33 @@ jobs:
4550          submodules : recursive 
4651          fetch-depth : 0 
4752
48-       #  Used to host cibuildwheel runner
49-       - uses : actions/setup-python@v5 
50-         with :
51-           python-version : ' 3.x' 
52- 
5353      - name : Set up QEMU 
5454        if : runner.os == 'Linux' 
5555        uses : docker/setup-qemu-action@v3 
5656        with :
5757          platforms : all 
5858
59-       - name : Install cibuildwheel 
60-         run : python -m pip install cibuildwheel==2.16.2 
61- 
6259      - name : Build wheels 
63-         run : | 
64-           python -m cibuildwheel --output-dir wheelhouse statsmodels 
60+ 61+         if : matrix.python_impl != 'Pyodide' 
62+         with :
63+           output-dir : wheelhouse 
64+           package-dir : statsmodels 
65+         env :
66+           CIBW_BEFORE_BUILD : ' git submodule foreach git checkout  ${{ env.BUILD_COMMIT }}' 
67+ 
68+       - name : Build Pyodide wheel 
69+         if : matrix.python_impl == 'Pyodide' 
70+ 71+         with :
72+           output-dir : wheelhouse 
73+           package-dir : statsmodels 
6574        env :
6675          CIBW_BEFORE_BUILD : ' git submodule foreach git checkout  ${{ env.BUILD_COMMIT }}' 
76+           CIBW_PLATFORM : pyodide 
77+           #  Tests are slow, and statsmodels is tested out-of-tree on PRs in the main repository
78+           #  CIBW_TEST_REQUIRES: pytest
79+           #  CIBW_TEST_COMMAND: python -c "import statsmodels; statsmodels.test(['--skip-examples','--skip-slow'])"
6780
6881      - name : Setup Upload Variables 
6982        if : ${{ always() }} 
0 commit comments