Skip to content

Commit f8a5798

Browse files
committed
Amalgam of conda patches and build fixes
Did this work a bit out of order so squashed it all into one commit. Conda related: - switch to BUNDLED arrow dependency source - this lets us remove our direct deps on lz4, flatbuffers, zstd - add abi3 feature to crate + enable unless CONDA_BUILD is set - when CONDA_BUILD is set, pass PYTHON to maturin build --interpeter flag - remove vestigal use of CMAKE_ARGS from .txt.in files - parse CMAKE_ARGS from environment (unrelated to above item) - this is so we pick up the cross-compiling toolchain (i.e. CMAKE_LIBTOOL) in conda Not conda related: - switch away from global include_directories() calls - these add include paths to every target, including our dependencies - instead, export lists of INCLUDE_DIRS from every dependency, and then assemble them into a list to be passed to `target_include_directories` on the psp and perspective_esm targets - decouples order of psp_build_dep() calls and order of include directories - switch Boost from a system dependency to psp_build_dep - eventually, to support Conda, we'll add a "use system dependency" feature to psp_build_dep for all dependencies - caveat: the boost download is a bit slow Signed-off-by: Tom Jakubowski <tom@prospective.dev>
1 parent cf12bce commit f8a5798

28 files changed

+194
-272
lines changed

.github/actions/install-deps/action.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ runs:
111111
# with:
112112
# key: ${{ github.job }}-${{ matrix.os }}
113113

114-
# TODO this should move to `install_tools.mjs`
115114
- name: Windows init steps (vc143)
116115
id: vcpkg-step
117116
shell: pwsh
@@ -220,17 +219,6 @@ runs:
220219
fi
221220
if: ${{ runner.os == 'Linux' && inputs.cpp == 'true' && inputs.javascript == 'false' }}
222221

223-
# TODO do this earlier?
224-
- name: Linux init steps
225-
shell: bash
226-
run: node tools/perspective-scripts/install_tools.mjs
227-
if: ${{ runner.os != 'Windows' && inputs.cpp == 'true' && inputs.manylinux == 'true' }}
228-
229-
- name: Linux init steps
230-
shell: bash
231-
run: sudo node tools/perspective-scripts/install_tools.mjs
232-
if: ${{ runner.os != 'Windows' && inputs.cpp == 'true' && inputs.manylinux == 'false' }}
233-
234222
- name: Install Python Pyodide dependencies
235223
shell: bash
236224
run: python -m pip install -r rust/perspective-python/requirements-pyodide.txt

.github/workflows/build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ jobs:
250250
if: ${{ contains(matrix.os, 'windows') }}
251251
env:
252252
CARGO_TARGET_DIR: D:\psp-rust
253+
PSP_CPP_BUILD_DIR: D:\psp-build
253254
PSP_ROOT_DIR: ${{ github.workspace }}
254255
PACKAGE: "perspective-python"
255256
PSP_ARCH: ${{ matrix.arch }}

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ build/
33
node_modules/
44
target/
55
.emsdk/
6+
.venv*/
67
boost*/
78
py_modules/
89
ts-rs/
910
rust/perspective-python/perspective/labextension/
1011
rust/perspective-python/perspective.data/
1112
rust/perspective-python/*/data
1213
expression_gen.md
13-
rust/perspective-viewer/docs/exprtk.md
14+
rust/perspective-viewer/docs/exprtk.md

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DEVELOPMENT.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ automatically call the correct build and test tools.
2323
dependencies to be installed:
2424

2525
- [CMake](https://cmake.org/) (version 3.29.5 or higher)
26-
- [Boost](https://www.boost.org/) (version 1.83 or highery). This can be
27-
installed from tarball with the included script
28-
`node tools/perspective-scripts/install_tools.mjs`.
2926
- [pnpm](https://pnpm.io/).
3027

3128
**_This list may be non-exhaustive depending on your OS/environment; please open

cmake/Boost.txt.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cmake_minimum_required(VERSION 3.7.2)
2+
3+
project(Boost-download NONE)
4+
5+
# Makes GIT_SUBMODULES "" in ExternalProject_Add skip initializing submodules
6+
cmake_policy(SET CMP0097 NEW)
7+
8+
include(ExternalProject)
9+
ExternalProject_Add(Boost
10+
URL "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.gz"
11+
SOURCE_DIR "${CMAKE_BINARY_DIR}/Boost-src"
12+
BINARY_DIR "${CMAKE_BINARY_DIR}/Boost-build"
13+
SOURCE_SUBDIR ""
14+
CONFIGURE_COMMAND ""
15+
BUILD_COMMAND ""
16+
INSTALL_COMMAND ""
17+
TEST_COMMAND ""
18+
)

cmake/Pybind.txt.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ ExternalProject_Add(pybind11
1212
BUILD_COMMAND ""
1313
INSTALL_COMMAND ""
1414
TEST_COMMAND ""
15-
CMAKE_ARGS " -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
1615
)

cmake/arrow.txt.in

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ cmake_minimum_required(VERSION 3.7.2)
22

33
project(arrow-download NONE)
44

5-
# *******************************************************************
6-
# NOTE: this depedency's CMakeLists.txt is overloaded, make sure to
7-
# adjust if you update the tag
8-
# *******************************************************************
5+
# Makes GIT_SUBMODULES "" in ExternalProject_Add skip initializing submodules
6+
cmake_policy(SET CMP0097 NEW)
97

108
include(ExternalProject)
119
ExternalProject_Add(apachearrow
1210
GIT_REPOSITORY https://github.com/apache/arrow.git
1311
GIT_TAG apache-arrow-17.0.0
12+
GIT_SUBMODULES ""
13+
GIT_SHALLOW TRUE
1414
SOURCE_DIR "${CMAKE_BINARY_DIR}/arrow-src"
1515
BINARY_DIR "${CMAKE_BINARY_DIR}/arrow-build"
1616
SOURCE_SUBDIR "cpp"
1717
CONFIGURE_COMMAND ""
1818
BUILD_COMMAND ""
1919
INSTALL_COMMAND ""
2020
TEST_COMMAND ""
21-
CMAKE_ARGS "-DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
21+
# This patch is to work around https://github.com/apache/arrow/issues/44384
22+
# It can be removed when a version of Arrow is released with https://github.com/apache/arrow/pull/44385
23+
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> git apply ${CMAKE_SOURCE_DIR}/patches/fix_arrow_libtool.patch
2224
)

cmake/date.txt.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ ExternalProject_Add(date
1212
BUILD_COMMAND ""
1313
INSTALL_COMMAND ""
1414
TEST_COMMAND ""
15-
CMAKE_ARGS " -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
1615
)

cmake/double-conversion.txt.in

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)