PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

Start building WASM wheels against newer Pyodide (version 0.26.0) #742

Closed agriyakhetarpal closed 1 month ago

agriyakhetarpal commented 1 month ago

According to https://github.com/pyodide/pyodide/discussions/4751 and https://github.com/pyodide/pyodide/issues/4713, a release for Pyodide 0.26.0 (Emscripten 3.1.52 + Python 3.12.2) should hit by Monday; a few days from now at the time of writing. This issue is being opened as a reminder to look to bump the configuration out-of-tree build in emscripten.yml and build against the newer versions because the ABI is going to break. This is probably not something to be done very urgently, but definitely sometime sooner or later, since the in-tree builds for PyWavelets will have been succeeding already.

agriyakhetarpal commented 1 month ago

Pyodide 0.26.0 is now out and I started to do this, but I noticed that we don't have a pin on the pyodide-build version in the job, so it should use the newer Pyodide version automatically the next time it runs (which will be at 0300 hours UTC on the 3rd of June, 2024; in five days at the time of writing). Should we add a pin here, @rgommers? If not, should I unpin the job in numpy/numpy#26564 as well?

rgommers commented 1 month ago

Not sure, it doesn't need to match the numpy repo for me. For NumPy it's more important that things don't break; on this repo we'll probably forget to update the pin if it's there.

I had a quick look, but I think CI is set up such that the Emscripten version is correct since it's retrieved from pyodide config. If it won't break, then there is nothing to do here.

I just triggered a run at https://github.com/PyWavelets/pywt/actions/runs/9283490221

rgommers commented 1 month ago

Something broke indeed:

 Traceback (most recent call last):
  File "/home/runner/work/pywt/pywt/.venv-pyodide/lib/python3.11/site-packages/_pytest/cacheprovider.py", line 186, in set
  File "/home/runner/work/pywt/pywt/.venv-pyodide/lib/python3.11/site-packages/_pytest/cacheprovider.py", line 128, in _mkdir
  File "/home/runner/work/pywt/pywt/.venv-pyodide/lib/python3.11/site-packages/_pytest/cacheprovider.py", line 223, in _ensure_cache_dir_and_supporting_files
PermissionError: [Errno 2] Permission denied: '/home/runner/work/pywt/pywt/pytest-cache-files-nzzedxu6/README.md'

so it'd be nice to look into fixing that.

agriyakhetarpal commented 1 month ago

So I looked at this and this is a bit strange because PyWavelets builds successfully, the test suite passes, and it is only at the time of closing everything that it fails because of insufficient permissions, it doesn't look related to Pyodide. Disabling the bytecode generation should work, we don't need it considering that this is an ephemeral system.