From e3173bfdc75258e23079ad7e75a402a5793d14f4 Mon Sep 17 00:00:00 2001 From: Andrew Stein Date: Sun, 13 Oct 2024 19:35:43 -0400 Subject: [PATCH] WIP2 Signed-off-by: Andrew Stein --- .github/actions/install-deps/action.yaml | 4 ++++ .github/workflows/build.yaml | 29 ++++++++---------------- rust/perspective-js/build.js | 2 +- rust/perspective-python/build.mjs | 4 ++-- rust/perspective-viewer/Cargo.toml | 1 - rust/perspective-viewer/src/rust/lib.rs | 1 - rust/perspective/build.mjs | 2 +- 7 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/actions/install-deps/action.yaml b/.github/actions/install-deps/action.yaml index b1ed9eb378..93c6fd73f6 100644 --- a/.github/actions/install-deps/action.yaml +++ b/.github/actions/install-deps/action.yaml @@ -131,6 +131,10 @@ runs: shell: bash run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)" >> $GITHUB_ENV + # Use python 3.9 from manylinu + - run: echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH + if: ${{ runner.os == 'Linux' }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 if: ${{ inputs.python == 'true' && runner.os != 'Linux' }} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 09c43de471..6f6fbd6703 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -154,26 +154,20 @@ jobs: PACKAGE: "perspective-cpp,perspective,perspective-viewer,perspective-viewer-datagrid,perspective-viewer-d3fc,perspective-viewer-openlayers,perspective-workspace,perspective-cli" # PSP_USE_CCACHE: 1 - # - name: Docs Build - # run: pnpm run docs - - # env: - # PACKAGE: "!perspective-python,!perspective-jupyterlab" - - uses: actions/upload-artifact@v4 with: name: perspective-js-dist path: | - rust/perspective-js/dist/ - rust/perspective-viewer/dist - packages/perspective-jupyterlab/dist/ - packages/perspective-viewer-d3fc/dist - packages/perspective-viewer-datagrid/dist - packages/perspective-viewer-openlayers/dist - packages/perspective-esbuild-plugin/dist - packages/perspective-webpack-plugin/dist - packages/perspective-cli/dist - packages/perspective-workspace/dist + rust/perspective-js/ + rust/perspective-viewer/ + packages/perspective-jupyterlab/ + packages/perspective-viewer-d3fc/ + packages/perspective-viewer-datagrid/ + packages/perspective-viewer-openlayers/ + packages/perspective-esbuild-plugin/ + packages/perspective-webpack-plugin/ + packages/perspective-cli/ + packages/perspective-workspace/ # ,-,---. . . .-,--. . . # '|___/ . . . | ,-| '|__/ . . |- |-. ,-. ,-. @@ -237,9 +231,6 @@ jobs: manylinux: ${{ matrix.container && 'true' || 'false' }} skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }} - - run: echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH - if: ${{ runner.os == 'Linux' }} - - name: Python Build run: pnpm run build if: ${{ !contains(matrix.os, 'windows') }} diff --git a/rust/perspective-js/build.js b/rust/perspective-js/build.js index d96a2443eb..88089c0fe5 100644 --- a/rust/perspective-js/build.js +++ b/rust/perspective-js/build.js @@ -71,7 +71,7 @@ function get_host() { function build_rust() { const release_flag = IS_DEBUG ? "" : "--release"; execSync( - `PSP_ROOT_DIR=../.. cargo bundle --target=${get_host()} -- perspective_js ${release_flag} --features=export-init,external-cpp`, + `PSP_ROOT_DIR=../.. cargo bundle --target=${get_host()} -- perspective_js ${release_flag}`, INHERIT ); } diff --git a/rust/perspective-python/build.mjs b/rust/perspective-python/build.mjs index 78fbd50835..e6a7079a73 100644 --- a/rust/perspective-python/build.mjs +++ b/rust/perspective-python/build.mjs @@ -87,7 +87,7 @@ if (build_wheel) { flags += " -vv"; } - cmd.sh(`maturin build ${flags} --features=external-cpp ${target}`); + cmd.sh(`maturin build ${flags} ${target}`); } const old = fs.readFileSync("./pyproject.toml"); @@ -101,7 +101,7 @@ if (build_sdist) { } if (!build_wheel && !build_sdist) { - cmd.sh(`maturin develop ${flags} --features=external-cpp`); + cmd.sh(`maturin develop ${flags}`); } cmd.runSync(); diff --git a/rust/perspective-viewer/Cargo.toml b/rust/perspective-viewer/Cargo.toml index e907ba691b..459e1d0b96 100644 --- a/rust/perspective-viewer/Cargo.toml +++ b/rust/perspective-viewer/Cargo.toml @@ -32,7 +32,6 @@ crate-type = ["cdylib", "rlib"] path = "src/rust/lib.rs" [features] -external-bootstrap = [] metadata = [] default = [] diff --git a/rust/perspective-viewer/src/rust/lib.rs b/rust/perspective-viewer/src/rust/lib.rs index fed51215b7..7fd65644e7 100644 --- a/rust/perspective-viewer/src/rust/lib.rs +++ b/rust/perspective-viewer/src/rust/lib.rs @@ -124,7 +124,6 @@ pub fn registerPlugin(name: &str) { /// Elements from JavaScript, as the methods themselves won't be defined yet. /// By default, this crate does not register `PerspectiveViewerElement` (as to /// preserve backwards-compatible synchronous API). -#[cfg(not(feature = "external-bootstrap"))] #[wasm_bindgen(js_name = "init")] pub fn js_init() { perspective_js::utils::set_global_logging(); diff --git a/rust/perspective/build.mjs b/rust/perspective/build.mjs index 378fe95f24..47692a76ed 100644 --- a/rust/perspective/build.mjs +++ b/rust/perspective/build.mjs @@ -40,5 +40,5 @@ if (process.env.PSP_ARCH === "x86_64" && process.platform === "darwin") { target = "--target=aarch64-unknown-linux-gnu"; } -cmd.sh(`cargo build ${flags} ${target} --features=external-cpp`); +cmd.sh(`cargo build ${flags} ${target}`); cmd.runSync();