From 59c759784c471380ec524aeb2d02752d41a3199d Mon Sep 17 00:00:00 2001 From: Tom Jakubowski Date: Thu, 24 Oct 2024 17:17:18 -0700 Subject: [PATCH] Package labextension with sdist --- packages/perspective-jupyterlab/build.mjs | 11 +++++++---- rust/perspective-python/pyproject.toml | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/perspective-jupyterlab/build.mjs b/packages/perspective-jupyterlab/build.mjs index 6bafccf6f6..387a354002 100644 --- a/packages/perspective-jupyterlab/build.mjs +++ b/packages/perspective-jupyterlab/build.mjs @@ -139,10 +139,13 @@ async function build_all() { ); const psp_dir = `perspective_python-${version}.data`; - await cpy( - ["dist/cjs/**/*"], - `../../rust/perspective-python/${psp_dir}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab` - ); + const dests = [ + `../../rust/perspective-python/perspective/labextension`, // used for sdist + `../../rust/perspective-python/${psp_dir}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab`, // used for wheel + ]; + for (const dest of dests) { + await cpy(["dist/cjs/**/*"], dest); + } } build_all(); diff --git a/rust/perspective-python/pyproject.toml b/rust/perspective-python/pyproject.toml index 208257a1e9..ccc213fd9f 100644 --- a/rust/perspective-python/pyproject.toml +++ b/rust/perspective-python/pyproject.toml @@ -46,6 +46,7 @@ module-name = "perspective" data = "perspective_python-3.1.2.data" features = ["pyo3/extension-module"] include = [ + { path = "perspective/labextension/**/*", format = "sdist" }, { path = "perspective/*libpsp.so", format = "wheel" }, { path = "perspective/*libpsp.dll", format = "wheel" }, ]