From f90193164f386cc04b2e39c1a027de508421fee4 Mon Sep 17 00:00:00 2001 From: Alexis Jeandet Date: Sat, 27 Jun 2026 14:34:51 +0200 Subject: [PATCH] Make netCDF4 optional on Emscripten/WASM netCDF4 is a compiled extension with no Pyodide wheel, so requiring it unconditionally makes PyISTP (and anything depending on it, e.g. Speasy) uninstallable under WASM. Mark it `; sys_platform != "emscripten"` so micropip skips it there. The netCDF driver is already imported lazily (only when a netCDF/HDF file is actually read), so `import pyistp` keeps working without netCDF4; CDF support via pycdfpp is unaffected. Co-Authored-By: Claude Opus 4.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6795c84..3ca1dc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -dependencies = ['pycdfpp>=0.6.0', 'netCDF4'] +dependencies = ['pycdfpp>=0.6.0', 'netCDF4; sys_platform != "emscripten"'] [project.urls] homepage = "https://github.com/SciQLop/PyISTP" repository = "https://github.com/SciQLop/PyISTP"