diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 982877ee7f365..ddb6ecbe83126 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -391,6 +391,7 @@ jobs: env: PYTHON_GIL: 0 + # NOTE: this job must be kept in sync with the Pyodide build job in wheels.yml emscripten: # Note: the Python version, Emscripten toolchain version are determined # by the Pyodide version. The appropriate versions can be found in the diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f61ef550f74df..02100648b636a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -100,6 +100,13 @@ jobs: - [windows-2022, win_amd64] # TODO: support PyPy? python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]] + + # Build Pyodide wheels and upload them to Anaconda.org + # NOTE: this job is similar to the one in unit-tests.yml except for the fact + # that it uses cibuildwheel instead of a standard Pyodide xbuildenv setup. + include: + - buildplat: [ubuntu-22.04, pyodide_wasm32] + python: ["cp312", "3.12"] env: IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }} IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} @@ -146,6 +153,7 @@ jobs: env: CIBW_PRERELEASE_PYTHONS: True CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} + CIBW_PLATFORM: ${{ matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide' || 'auto' }} - name: Set up Python uses: mamba-org/setup-micromamba@v1 diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index 7b93416600f8f..ca97af0d3eb32 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -7,6 +7,8 @@ import numpy as np import pytest +from pandas.compat import WASM + import pandas as pd from pandas import Series import pandas._testing as tm @@ -233,6 +235,7 @@ def test_temp_setattr(with_exception): assert ser.name == "first" +@pytest.mark.skipif(WASM, reason="Can't start subprocesses in WASM") @pytest.mark.single_cpu def test_str_size(): # GH#21758 diff --git a/pyproject.toml b/pyproject.toml index 9156c73efbb35..47fd540d67ab2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -177,6 +177,16 @@ test-command = "" select = "*-macosx*" environment = {CFLAGS="-g0"} +[[tool.cibuildwheel.overrides]] +select = "*pyodide*" +test-requires = "pytest>=7.3.2 hypothesis>=6.46.1" +# Pyodide repairs wheels on its own, using auditwheel-emscripten +repair-wheel-command = "" +test-command = """ + PANDAS_CI='1' python -c 'import pandas as pd; \ + pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \ + """ + [tool.ruff] line-length = 88 target-version = "py310"