Skip to content

Commit eec38ad

Browse files
authored
Merge pull request #3245 from perspective-dev/tkp/pyodide-314
Update Pyodide build to Python 3.14 / 2026
2 parents e78decc + 0e0edea commit eec38ad

8 files changed

Lines changed: 23 additions & 18 deletions

File tree

‎.github/workflows/build.yaml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ jobs:
511511
arch:
512512
- x86_64
513513
python-version:
514-
- "3.13"
514+
- "3.14"
515515
node-version: [22.x]
516516
steps:
517517
- name: Checkout
@@ -526,17 +526,17 @@ jobs:
526526
name: perspective-metadata
527527
path: rust/
528528

529-
# Shares the `emscripten-wasm32` ccache prefix and `wasm32`
530-
# emsdk sysroot with `build_js` — same toolchain, same target.
529+
# Pyodide requires a newer Emscripten toolchain than the browser
530+
# build, so its compiler and sysroot caches must remain separate.
531531
- name: Initialize Build
532532
id: init-step
533533
uses: ./.github/actions/install-deps
534534
with:
535535
javascript: "false"
536536
arch: ${{ matrix.arch }}
537537
manylinux: "false"
538-
ccache: "emscripten-wasm32"
539-
emsdk_cache: "wasm32"
538+
ccache: "pyodide-wasm32"
539+
emsdk_cache: "pyodide-wasm32"
540540
cargo_cache: "false"
541541
cache_save: ${{ steps.config-step.outputs.SAVE_CACHE }}
542542
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
@@ -578,8 +578,8 @@ jobs:
578578
for w in "${wheels[@]}"; do
579579
echo "checking $w"
580580
case "$w" in
581-
*pyemscripten_2025_0_wasm32.whl) ;;
582-
*) echo "::error::$w is not tagged pyemscripten_2025_0_wasm32"; exit 1 ;;
581+
*pyemscripten_2026_0_wasm32.whl) ;;
582+
*) echo "::error::$w is not tagged pyemscripten_2026_0_wasm32"; exit 1 ;;
583583
esac
584584
unzip -l "$w" | grep 'perspective/widget/static/perspective-anywidget.js' \
585585
|| { echo "::error::$w is missing the anywidget JS bundle"; exit 1; }
@@ -605,7 +605,7 @@ jobs:
605605
arch:
606606
- x86_64
607607
python-version:
608-
- "3.13"
608+
- "3.14"
609609
node-version: [22.x]
610610
steps:
611611
- name: Checkout
@@ -1240,7 +1240,7 @@ jobs:
12401240

12411241
- uses: actions/download-artifact@v4
12421242
with:
1243-
name: perspective-python-dist-wasm32-emscripten-3.13
1243+
name: perspective-python-dist-wasm32-emscripten-3.14
12441244

12451245
- uses: actions/download-artifact@v4
12461246
with:

‎DEVELOPMENT.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ this within a virtual environment.
168168

169169
To build for [Pyodide](https://pyodide.org/), select
170170
`perspective-python (pyodide)` in `pnpm run setup` and install the pinned
171-
Pyodide distribution with `pnpm run install_pyodide`.
171+
Pyodide distribution with `pnpm run install_pyodide`. Pyodide builds use the
172+
separate `pyodide_emscripten` version pinned in `package.json`.
172173

173174
### `perspective-jupyterlab`
174175

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
},
1515
"type": "module",
1616
"emscripten": "4.0.9",
17+
"pyodide_emscripten": "5.0.3",
1718
"binaryen": "version_132",
1819
"llvm": "17.0.6",
19-
"pyodide": "0.29.4",
20+
"pyodide": "314.0.7",
2021
"engines": {
2122
"node": ">=16 <27"
2223
},

‎rust/perspective-python/build.mjs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if (!!process.env.PSP_DEBUG) {
3232
const is_pyodide = !!process.env.PSP_PYODIDE;
3333

3434
const python_version =
35-
process.env.PSP_PYTHON_VERSION || (is_pyodide ? "3.13" : "3.12");
35+
process.env.PSP_PYTHON_VERSION || (is_pyodide ? "3.14" : "3.12");
3636

3737
const version = pkg.version;
3838

@@ -45,12 +45,12 @@ const env = { ...process.env };
4545
let emsdk_prefix = "";
4646
if (is_pyodide) {
4747
const emsdkdir = path.resolve(__dirname, "../../.emsdk");
48-
const { emscripten } = JSON.parse(
48+
const { pyodide_emscripten } = JSON.parse(
4949
fs.readFileSync(path.resolve(__dirname, "../../package.json")),
5050
);
51-
emsdk_prefix = `cd ${emsdkdir} && . ./emsdk_env.sh && ./emsdk activate ${emscripten} && cd ${cwd} && `;
51+
emsdk_prefix = `cd ${emsdkdir} && . ./emsdk_env.sh && ./emsdk activate ${pyodide_emscripten} && cd ${cwd} && `;
5252
env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION =
53-
process.env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION || "2025_0";
53+
process.env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION || "2026_0";
5454
}
5555

5656
// if not windows

‎rust/perspective-python/pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ classifiers = [
5555
"Programming Language :: Python :: 3.11",
5656
"Programming Language :: Python :: 3.12",
5757
"Programming Language :: Python :: 3.13",
58+
"Programming Language :: Python :: 3.14",
5859
"Framework :: Jupyter",
5960
"Framework :: Jupyter :: JupyterLab",
6061
"Framework :: Jupyter :: JupyterLab :: 3",

‎rust/perspective-server/cpp/perspective/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ endif()
369369
set(RAPIDJSON_BUILD_TESTS OFF CACHE BOOL "Disable rapidjson tests")
370370

371371
if(PSP_PYODIDE)
372-
set(RELOCATABLE_FLAGS " -sRELOCATABLE=1 -sSIDE_MODULE=2 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm \ ")
372+
set(RELOCATABLE_FLAGS " -sSIDE_MODULE=2 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm \ ")
373373
string(APPEND CMAKE_EXE_LINKER_FLAGS "${RELOCATABLE_FLAGS} -sWASM_BIGINT=1 ")
374374
string(APPEND CMAKE_C_FLAGS "${RELOCATABLE_FLAGS}")
375375
string(APPEND CMAKE_CXX_FLAGS "${RELOCATABLE_FLAGS}")

‎tools/scripts/install_emsdk.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import "zx/globals";
2020

2121
const pkg = getWorkspacePackageJson();
2222

23-
const emscripten = pkg.emscripten;
23+
const emscripten = process.env.PSP_PYODIDE
24+
? pkg.pyodide_emscripten
25+
: pkg.emscripten;
2426

2527
dotenv.config({ path: "./.perspectiverc", quiet: true });
2628

‎tools/scripts/workspace.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function getRustWheelsDir() {
4242

4343
export function getEmscriptenWheelPath() {
4444
const pspVersion = getWorkspacePackageJson().version.replace("-", ".");
45-
const wheeljunk = "cp311-abi3-pyemscripten_2025_0_wasm32";
45+
const wheeljunk = "cp311-abi3-pyemscripten_2026_0_wasm32";
4646
return path.join(
4747
rustWheelsDir,
4848
`perspective_python-${pspVersion}-${wheeljunk}.whl`,

0 commit comments

Comments
 (0)