File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed
Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 5454 -DCMAKE_INSTALL_PREFIX="$PREFIX" \
5555 -DCMAKE_FIND_ROOT_PATH="$PREFIX" \
5656 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
57+ -DXEUS_OCTAVE_PKG_REBUILD=ON \
5758 -DCMAKE_VERBOSE_MAKEFILE=ON
5859
5960 emmake make -j${{ env.ncpus }} install
6566 --XeusAddon.prefix=${{ env.PREFIX }} \
6667 --XeusAddon.mounts=$PREFIX/share/octave:/share/octave \
6768 --XeusAddon.mounts=$PREFIX/share/xeus-octave:/share/xeus-octave \
69+ --XeusAddon.default_channels=https://repo.prefix.dev/emscripten-forge-dev \
70+ --XeusAddon.default_channels=https://repo.prefix.dev/conda-forge \
6871 --contents notebooks/xeus-octave-wasm.ipynb \
6972 --output-dir dist
7073
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ option(XEUS_OCTAVE_BUILD_STATIC "Build xeus-octave static library" OFF)
6464option (XEUS_OCTAVE_BUILD_SHARED "Split xoctave build into executable and library" ON )
6565option (XEUS_OCTAVE_BUILD_EXECUTABLE "Build the xoctave executable" ON )
6666
67+ option (XEUS_OCTAVE_PKG_REBUILD "Run pkg rebuild upon starting the kernel" OFF )
68+
6769option (
6870 XEUS_OCTAVE_USE_SHARED_XEUS_ZMQ
6971 "Link xeus-octave with the xeus-zmq shared library (instead of the static library)"
@@ -252,6 +254,10 @@ macro(xeus_octave_create_target target_name linkage output_name)
252254 PRIVATE XEUS_OCTAVE_OVERRIDE_PATH="${CMAKE_INSTALL_PREFIX} /share/xeus-octave"
253255 )
254256
257+ if (XEUS_OCTAVE_PKG_REBUILD)
258+ target_compile_definitions (${target_name} PRIVATE "XEUS_OCTAVE_PKG_REBUILD" )
259+ endif ()
260+
255261 target_include_directories (
256262 ${target_name}
257263 PUBLIC $<BUILD_INTERFACE:${XEUS_OCTAVE_INCLUDE_DIR} > $<INSTALL_INTERFACE:include >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ dependencies:
88 - nlohmann_json
99 - nlohmann_json-abi
1010 - octave
11+ - octave-fuzzy-logic-toolkit
1112 - libpng
1213 - zlib
1314 - libflang
Original file line number Diff line number Diff line change @@ -437,6 +437,13 @@ void xoctave_interpreter::configure_impl()
437437 // Initialize interpreter
438438 m_octave_interpreter.execute ();
439439
440+ #ifdef XEUS_OCTAVE_PKG_REBUILD
441+ // Run pkg rebuild upon starting the kernel
442+ std::string pkg_rebuild (" pkg rebuild" );
443+ int status = 0 ;
444+ m_octave_interpreter.eval_string (pkg_rebuild, true , status);
445+ #endif
446+
440447 // Fix disp function and clear display function
441448 m_octave_interpreter.get_symbol_table ().install_built_in_function (" display" , octave_value ());
442449
You can’t perform that action at this time.
0 commit comments