diff --git a/netlify.toml b/netlify.toml index 7d8d2ad..62f9dee 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,16 +3,22 @@ publish = "dist/pyodide" [dev] - # Prevent Netlify from watching these folders for changes ignore = ["dist", ".wasm-build-venv", "panel/data"] - # Force it to use a specific port to avoid EADDRINUSE port = 8888 [build.environment] PYTHON_VERSION = "3.11" + NODE_VERSION = "20" + CACHE_VERSION = "2" [[headers]] for = "/*" [headers.values] Cross-Origin-Embedder-Policy = "require-corp" Cross-Origin-Opener-Policy = "same-origin" + +[[headers]] + for = "/*.whl" + [headers.values] + Content-Type = "application/zip" + Access-Control-Allow-Origin = "*" diff --git a/scripts/build_wasm.sh b/scripts/build_wasm.sh index 17e8ce8..78d6693 100755 --- a/scripts/build_wasm.sh +++ b/scripts/build_wasm.sh @@ -39,8 +39,13 @@ PYTHON_BIN="${VENV_DIR}/bin/python" # Install build dependencies and build the wheel echo "Installing build tools and generating local wheel..." -"${PYTHON_BIN}" -m pip install --upgrade pip build panel matplotlib seaborn scipy SALib - +"${PYTHON_BIN}" -m pip install --upgrade pip build \ + "panel==1.8.10" \ + "bokeh==3.8.0" \ + "matplotlib==3.10.8" \ + "seaborn==0.13.2" \ + "scipy==1.17.1" \ + "SALib==1.5.2" # Clean old builds to avoid picking up the wrong wheel rm -rf dist/*.whl "${PYTHON_BIN}" -m build --wheel .