mirror of
https://github.com/ceph/ceph
synced 2025-01-29 06:24:03 +00:00
cmake: no need to setup venv for dashboard
unlike ceph-disk and ceph-detect-init, dashboard is not a standalone python application, it is a python application hosted by ceph-mgr, so no need to create a venv in which it is deployed. the python env created by tox would suffice. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
213652aa6d
commit
b41e049cca
@ -1,13 +1,3 @@
|
||||
set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv)
|
||||
|
||||
add_custom_target(mgr-dashboard-test-venv
|
||||
COMMAND
|
||||
${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${MGR_DASHBOARD_VIRTUALENV} &&
|
||||
${MGR_DASHBOARD_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/wheelhouse -r requirements.txt
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard
|
||||
COMMENT "dashboard tests virtualenv is being created")
|
||||
add_dependencies(tests mgr-dashboard-test-venv)
|
||||
|
||||
if(WITH_MGR_DASHBOARD_FRONTEND AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM")
|
||||
|
||||
set(mgr-dashboard-nodeenv ${CMAKE_CURRENT_BINARY_DIR}/node-env)
|
||||
|
@ -17,8 +17,6 @@ if [ -z $CEPH_BUILD_DIR ]; then
|
||||
export CEPH_BUILD_DIR=$(dirname ${TOX_PATH})
|
||||
fi
|
||||
|
||||
source ${MGR_DASHBOARD_VIRTUALENV}/bin/activate
|
||||
|
||||
if [ "$WITH_PYTHON2" = "ON" ]; then
|
||||
ENV_LIST+="py27-cov,py27-lint,"
|
||||
fi
|
||||
|
@ -584,9 +584,6 @@ endif(WITH_MGR)
|
||||
|
||||
set(CEPH_DISK_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv)
|
||||
set(CEPH_DETECT_INIT_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv)
|
||||
if(WITH_MGR)
|
||||
set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv)
|
||||
endif(WITH_MGR)
|
||||
|
||||
set_property(TEST
|
||||
run-tox-ceph-disk
|
||||
@ -600,7 +597,6 @@ set_property(TEST
|
||||
CEPH_BUILD_VIRTUALENV=${CEPH_BUILD_VIRTUALENV}
|
||||
CEPH_DISK_VIRTUALENV=${CEPH_DISK_VIRTUALENV}
|
||||
CEPH_DETECT_INIT_VIRTUALENV=${CEPH_DETECT_INIT_VIRTUALENV}
|
||||
MGR_DASHBOARD_VIRTUALENV=${MGR_DASHBOARD_VIRTUALENV}
|
||||
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib
|
||||
PATH=$ENV{PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src
|
||||
PYTHONPATH=${CMAKE_SOURCE_DIR}/src/pybind
|
||||
|
Loading…
Reference in New Issue
Block a user