Don't install content of openvino-dev; install wheels (#8820)
* Don't install content of openvino-dev * Install MO in tests * Install python's BA tool only for tests
This commit is contained in:
parent
f211749e15
commit
5a52a8e4a3
@ -86,9 +86,6 @@ function(openvino_developer_export_targets)
|
||||
"A list of OpenVINO exported components" FORCE)
|
||||
endfunction()
|
||||
|
||||
ie_cpack_add_component(ngraph REQUIRED)
|
||||
ie_cpack_add_component(ngraph_dev REQUIRED DEPENDS ngraph)
|
||||
|
||||
# add target with processed tests model zoo
|
||||
include(cmake/test_model_zoo.cmake)
|
||||
|
||||
|
@ -50,6 +50,11 @@ ie_dependent_option (ENABLE_PYTHON "enables ie python bridge build" OFF "PYTHONL
|
||||
find_package(PythonInterp 3 QUIET)
|
||||
ie_dependent_option (ENABLE_DOCS "Build docs using Doxygen" OFF "PYTHONINTERP_FOUND" OFF)
|
||||
|
||||
# this option should not be a part of InferenceEngineDeveloperPackage
|
||||
# since wheels can be built only together with main OV build
|
||||
cmake_dependent_option (ENABLE_WHEEL "Build wheel packages for PyPi" OFF
|
||||
"PYTHONINTERP_FOUND;CMAKE_SOURCE_DIR STREQUAL OpenVINO_SOURCE_DIR" OFF)
|
||||
|
||||
#
|
||||
# Inference Engine specific options
|
||||
#
|
||||
|
@ -13,8 +13,6 @@ if(NOT DEFINED OpenVINO_SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
option(ENABLE_CONDA_FOLDER "Create output folder with conda python bindings" OFF)
|
||||
cmake_dependent_option(ENABLE_WHEEL "Create wheel package" OFF
|
||||
"PYTHONINTERP_FOUND;NOT CMAKE_SOURCE_DIR STREQUAL ie_python_api_SOURCE_DIR" OFF)
|
||||
|
||||
set(PYTHON_BRIDGE_CPACK_PATH "python")
|
||||
|
||||
|
@ -55,9 +55,6 @@ add_custom_command(TARGET ${TARGET_NAME}
|
||||
|
||||
# install
|
||||
|
||||
# TODO: use ${PYTHON_VERSION}_dev component below
|
||||
# ie_cpack_add_component(${PYTHON_VERSION}_dev DEPENDS ${PYTHON_COMPONENT})
|
||||
|
||||
install(TARGETS ${TARGET_NAME}
|
||||
RUNTIME DESTINATION ${PYTHON_BRIDGE_CPACK_PATH}/${PYTHON_VERSION}/openvino/offline_transformations COMPONENT ${PYTHON_COMPONENT}
|
||||
LIBRARY DESTINATION ${PYTHON_BRIDGE_CPACK_PATH}/${PYTHON_VERSION}/openvino/offline_transformations COMPONENT ${PYTHON_COMPONENT})
|
||||
|
@ -71,3 +71,11 @@ add_custom_command(OUTPUT ${openvino_wheel_path}
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(ie_wheel ALL DEPENDS ${openvino_wheel_path})
|
||||
|
||||
# install
|
||||
|
||||
ie_cpack_add_component(python_wheels)
|
||||
|
||||
install(FILES ${openvino_wheel_path}
|
||||
DESTINATION tools
|
||||
COMPONENT python_wheels)
|
||||
|
@ -15,17 +15,17 @@ else()
|
||||
endif()
|
||||
|
||||
# install
|
||||
ie_cpack_add_component(model_optimizer)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/automation/version.txt.in"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/version.txt"
|
||||
@ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/automation/version.txt.in"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/version.txt" @ONLY)
|
||||
|
||||
# ie_cpack_add_component(model_optimizer)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
|
||||
DESTINATION tools/model_optimizer
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT model_optimizer
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL
|
||||
PATTERN ".*" EXCLUDE
|
||||
PATTERN "automation" EXCLUDE
|
||||
PATTERN "requirements_dev.txt" EXCLUDE
|
||||
@ -42,8 +42,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
|
||||
REGEX ".*\\.pyc$" EXCLUDE
|
||||
REGEX ".*\\.swp" EXCLUDE
|
||||
REGEX ".*\\.DS_Store$" EXCLUDE
|
||||
REGEX ".*_test\.py$" EXCLUDE
|
||||
)
|
||||
REGEX ".*_test\.py$" EXCLUDE)
|
||||
|
||||
install(FILES requirements_dev.txt
|
||||
DESTINATION tests/model_optimizer
|
||||
|
@ -65,10 +65,7 @@ if(OpenVINO_SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
if(OpenVINO_SOURCE_DIR OR InferenceEngineDeveloperPackage_FOUND)
|
||||
if(COMMAND ie_python_minimal_api)
|
||||
ie_python_minimal_api(_${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
add_clang_format_target(_${PROJECT_NAME}_clang FOR_TARGETS _${PROJECT_NAME})
|
||||
|
||||
ie_cpack_add_component(pyngraph_${PYTHON_VERSION})
|
||||
@ -85,6 +82,4 @@ if(OpenVINO_SOURCE_DIR OR InferenceEngineDeveloperPackage_FOUND)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../../tests
|
||||
DESTINATION tests/${PROJECT_NAME}
|
||||
COMPONENT tests EXCLUDE_FROM_ALL)
|
||||
|
||||
ie_cpack(pyngraph_${PYTHON_VERSION})
|
||||
endif()
|
||||
|
@ -48,10 +48,7 @@ if(OpenVINO_SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
if(OpenVINO_SOURCE_DIR OR InferenceEngineDeveloperPackage_FOUND)
|
||||
if(COMMAND ie_python_minimal_api)
|
||||
ie_python_minimal_api(${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
add_clang_format_target(${PROJECT_NAME}_clang FOR_TARGETS ${PROJECT_NAME})
|
||||
|
||||
ie_cpack_add_component(pyopenvino_${PYTHON_VERSION})
|
||||
@ -64,8 +61,6 @@ if(OpenVINO_SOURCE_DIR OR InferenceEngineDeveloperPackage_FOUND)
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
DESTINATION python/${PYTHON_VERSION}/openvino
|
||||
COMPONENT pyopenvino_${PYTHON_VERSION})
|
||||
|
||||
ie_cpack(pyopenvino_${PYTHON_VERSION})
|
||||
endif()
|
||||
|
||||
if(TARGET ie_wheel)
|
||||
|
@ -122,6 +122,9 @@ export(TARGETS ngraph NAMESPACE openvino::
|
||||
# Installation logic...
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
|
||||
ie_cpack_add_component(ngraph REQUIRED)
|
||||
ie_cpack_add_component(ngraph_dev REQUIRED DEPENDS ngraph)
|
||||
|
||||
install(TARGETS ngraph EXPORT OpenVINOTargets
|
||||
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT ngraph
|
||||
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT ngraph
|
||||
|
@ -1,31 +1,27 @@
|
||||
# Copyright (C) 2018-2021 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(OpenVINO_Tools DESCRIPTION "OpenVINO toolkit Development Tools")
|
||||
|
||||
if(NOT DEFINED OpenVINO_SOURCE_DIR)
|
||||
find_package(InferenceEngineDeveloperPackage QUIET)
|
||||
set(python_tools_only ON)
|
||||
endif()
|
||||
|
||||
#
|
||||
# C++ tools
|
||||
#
|
||||
|
||||
if(NOT python_tools_only)
|
||||
add_subdirectory(compile_tool)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Python tools
|
||||
#
|
||||
|
||||
# install deployment_manager
|
||||
|
||||
ie_cpack_add_component(deployment_manager REQUIRED)
|
||||
|
||||
install(DIRECTORY deployment_manager
|
||||
DESTINATION tools
|
||||
COMPONENT deployment_manager
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
|
||||
# copy benchmark_app scripts
|
||||
|
||||
if(ENABLE_PYTHON)
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
set(PYTHON_VERSION python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
@ -43,29 +39,28 @@ if(ENABLE_PYTHON)
|
||||
${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools/benchmark
|
||||
)
|
||||
|
||||
ie_cpack_add_component(python_tools_${PYTHON_VERSION})
|
||||
ie_cpack_add_component(python_tools)
|
||||
|
||||
# install benchmark_app tool
|
||||
# install BA tool for tests
|
||||
install(FILES benchmark_tool/README.md
|
||||
benchmark_tool/requirements.txt
|
||||
DESTINATION tools/benchmark_tool
|
||||
COMPONENT python_tools)
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
install(PROGRAMS benchmark_tool/benchmark_app.py
|
||||
DESTINATION tools/benchmark_tool
|
||||
COMPONENT python_tools)
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
# install openvino/tools/benchmark as a python package
|
||||
install(DIRECTORY benchmark_tool/openvino/tools/benchmark
|
||||
DESTINATION python/${PYTHON_VERSION}/openvino/tools
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT python_tools_${PYTHON_VERSION})
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
ie_cpack(python_tools python_tools_${PYTHON_VERSION})
|
||||
# build and install openvino-dev wheel
|
||||
|
||||
if(ENABLE_WHEEL)
|
||||
add_subdirectory(openvino_dev)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@ -20,3 +20,11 @@ add_custom_command(OUTPUT ${openvino_wheel_path}
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(openvino_dev_wheel ALL DEPENDS ${openvino_wheel_path})
|
||||
|
||||
# install
|
||||
|
||||
ie_cpack_add_component(python_wheels)
|
||||
|
||||
install(FILES ${openvino_wheel_path}
|
||||
DESTINATION tools
|
||||
COMPONENT python_wheels)
|
||||
|
Loading…
Reference in New Issue
Block a user