From: Kefu Chai Date: Thu, 12 Mar 2020 13:51:55 +0000 (+0800) Subject: cmake: use specified python for running node-gyp X-Git-Tag: v16.0.0~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c7de31d200802a5e4f76d557d8b217ee05d34d09;p=ceph.git 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 --- 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} )