From c7de31d200802a5e4f76d557d8b217ee05d34d09 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 12 Mar 2020 21:51:55 +0800 Subject: [PATCH] cmake: use specified python for running node-gyp to make sure node-gyp is able to find a compatible python3 see also https://github.com/nodejs/node-gyp#configuring-python-dependency Signed-off-by: Kefu Chai --- src/pybind/mgr/dashboard/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt index 9a8a03f0a8f..7d871f986db 100644 --- a/src/pybind/mgr/dashboard/CMakeLists.txt +++ b/src/pybind/mgr/dashboard/CMakeLists.txt @@ -37,6 +37,7 @@ else() COMMENT "dashboard nodeenv is being installed" ) add_custom_target(mgr-dashboard-nodeenv + COMMAND . ${mgr-dashboard-nodeenv-dir}/bin/activate && npm config set python ${MGR_PYTHON_EXECUTABLE} && deactivate DEPENDS ${mgr-dashboard-nodeenv-dir}/bin/npm WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) -- 2.39.5