Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ jobs:
arch:
- x86_64
python-version:
- 3.11
- "3.13"
node-version: [22.x]
steps:
- name: Checkout
Expand Down Expand Up @@ -424,6 +424,24 @@ jobs:
PACKAGE: "python"
CI: 1

- name: Verify wheel is PyPI-compatible (PEP 783)
shell: bash
run: |
python -m pip install --quiet --upgrade twine "packaging>=24.2"
shopt -s nullglob
wheels=(rust/target/wheels/*.whl)
if [ ${#wheels[@]} -eq 0 ]; then
echo "::error::no emscripten wheel was produced"; exit 1
fi
for w in "${wheels[@]}"; do
echo "checking $w"
case "$w" in
*pyemscripten_2025_0_wasm32.whl) ;;
*) echo "::error::$w is not tagged pyemscripten_2025_0_wasm32"; exit 1 ;;
esac
done
python -m twine check rust/target/wheels/*.whl

- uses: actions/upload-artifact@v4
with:
name: perspective-python-dist-wasm32-emscripten-${{ matrix.python-version }}
Expand All @@ -441,7 +459,7 @@ jobs:
arch:
- x86_64
python-version:
- 3.11
- "3.13"
node-version: [22.x]
steps:
- name: Checkout
Expand Down Expand Up @@ -996,7 +1014,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: perspective-python-dist-wasm32-emscripten-3.11
name: perspective-python-dist-wasm32-emscripten-3.13

- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "module",
"emscripten": "4.0.9",
"llvm": "17.0.6",
"pyodide": "0.29.3",
"pyodide": "0.29.4",
"engines": {
"node": ">=16 <24"
},
Expand Down
6 changes: 5 additions & 1 deletion rust/perspective-python/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ if (!!process.env.PSP_DEBUG) {
flags = "";
}

const python_version = process.env.PSP_PYTHON_VERSION || "3.12";
const is_pyodide = !!process.env.PSP_PYODIDE;

const python_version =
process.env.PSP_PYTHON_VERSION || (is_pyodide ? "3.13" : "3.12");

const version = pkg.version;

fs.mkdirSync(`./perspective_python-${version}.data`, { recursive: true });
Expand All @@ -47,6 +49,8 @@ if (is_pyodide) {
fs.readFileSync(path.resolve(__dirname, "../../package.json")),
);
emsdk_prefix = `cd ${emsdkdir} && . ./emsdk_env.sh && ./emsdk activate ${emscripten} && cd ${cwd} && `;
env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION =
process.env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION || "2025_0";
}

// if not windows
Expand Down
6 changes: 4 additions & 2 deletions rust/perspective-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

[build-system]
requires = ["maturin>=1.4,<2.0"]
requires = ["maturin>=1.13.3,<2.0"]
build-backend = "maturin"

[project]
name = "perspective-python"
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = []
license = { file = "LICENSE.md" }
license = "Apache-2.0"
license-files = ["LICENSE.md"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Rust",
Expand All @@ -29,6 +30,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 3",
"Framework :: Jupyter :: JupyterLab :: Extensions",
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Faker==26.0.0
ipywidgets==8.1.3
jupyterlab_git==0.50.1
jupyterlab==4.2.3
maturin==1.10.2
maturin==1.14.1
numpy==2.2.6
packaging==24.1
pandas==2.3.0
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/workspace.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getRustWheelsDir() {

export function getEmscriptenWheelPath() {
const pspVersion = getWorkspacePackageJson().version.replace("-", ".");
const wheeljunk = "cp311-abi3-emscripten_4_0_9_wasm32";
const wheeljunk = "cp311-abi3-pyemscripten_2025_0_wasm32";
return path.join(
rustWheelsDir,
`perspective_python-${pspVersion}-${wheeljunk}.whl`,
Expand Down
Loading