Build python wheel w/o strict dependency to _pyngraph (#4837)

* Build python wheel w/o strict dependency to _pyngraph

* Exclude extra components which are not needed for IE python wheel

- myriad_compile
- myriad_perfcheck
- compile_tool
- inference_engine_c
This commit is contained in:
Ilya Lavrenov 2021-03-18 11:00:14 +03:00 committed by GitHub
parent 7602e0cd6a
commit 25c2fea2f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 18 deletions

View File

@ -102,7 +102,7 @@ function(build_ngraph)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endif()
ie_cpack_add_component(ngraph)
ie_cpack_add_component(ngraph REQUIRED)
set(SDL_cmake_included ON)
set(NGRAPH_COMPONENT_PREFIX "deployment_tools/ngraph/")
@ -197,7 +197,7 @@ endif()
# install files for demo
ie_cpack_add_component(demo_scripts REQUIRED DEPENDS core)
ie_cpack_add_component(demo_scripts DEPENDS core)
if(UNIX)
install(DIRECTORY scripts/demo/

View File

@ -70,7 +70,7 @@ add_subdirectory(ie_bridges/c)
# install C++ samples
ie_cpack_add_component(cpp_samples REQUIRED DEPENDS core)
ie_cpack_add_component(cpp_samples DEPENDS core)
if(UNIX)
install(DIRECTORY samples/
@ -90,7 +90,7 @@ endif()
# install C samples
ie_cpack_add_component(c_samples REQUIRED DEPENDS core)
ie_cpack_add_component(c_samples DEPENDS core_c)
if(UNIX)
install(PROGRAMS samples/build_samples.sh
@ -114,7 +114,7 @@ install(FILES samples/CMakeLists.txt
# install Python samples
if(ENABLE_PYTHON)
ie_cpack_add_component(python_samples REQUIRED DEPENDS core)
ie_cpack_add_component(python_samples DEPENDS core)
install(DIRECTORY ${ie_python_api_SOURCE_DIR}/sample/
DESTINATION ${IE_CPACK_IE_DIR}/samples/python
@ -124,7 +124,7 @@ endif()
# install speech demo files
if(SPEECH_LIBS_AND_DEMOS)
ie_cpack_add_component(speech_demo_files REQUIRED)
ie_cpack_add_component(speech_demo_files)
install(DIRECTORY ${TEMP}/deployment_tools
${TEMP}/data_processing

View File

@ -126,7 +126,7 @@ if (THREADING STREQUAL "OMP")
log_rpath_from_dir(OMP "${OMP}/lib")
debug_message(STATUS "intel_omp=" ${OMP})
ie_cpack_add_component(omp)
ie_cpack_add_component(omp REQUIRED)
file(GLOB_RECURSE source_list "${OMP}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
install(FILES ${source_list}
DESTINATION "deployment_tools/inference_engine/external/omp/lib"

View File

@ -29,11 +29,13 @@ export(TARGETS ${TARGET_NAME} NAMESPACE IE::
# install
ie_cpack_add_component(core_c DEPENDS core)
install(TARGETS ${TARGET_NAME}
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core)
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core_c
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core_c
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core_c)
install(DIRECTORY ${InferenceEngine_C_API_SOURCE_DIR}/include/
DESTINATION ${IE_CPACK_IE_DIR}/include/
COMPONENT core)
COMPONENT core_c)

View File

@ -75,7 +75,7 @@ endif()
# install
ie_cpack_add_component(${PYTHON_VERSION} REQUIRED)
ie_cpack_add_component(${PYTHON_VERSION})
install(FILES requirements.txt
DESTINATION ${PYTHON_BRIDGE_CPACK_PATH}/${PYTHON_VERSION}

View File

@ -37,7 +37,18 @@ endif()
configure_file(${SETUP_ENV} "${CMAKE_CURRENT_SOURCE_DIR}/.env")
add_custom_target(ie_wheel ALL DEPENDS ie_libraries ie_plugins ie_api _pyngraph)
add_custom_target(ie_wheel ALL DEPENDS ie_libraries ie_plugins ie_api)
if(TARGET _pyngraph)
add_dependencies(ie_wheel _pyngraph)
endif()
if(LINUX)
find_host_program(patchelf_program NAMES patchelf)
if(NOT patchelf_program)
message(FATAL_ERROR "patchelf is not found, which is needed to build ie_wheel")
endif()
endif()
add_custom_command(TARGET ie_wheel
POST_BUILD

View File

@ -19,7 +19,7 @@ add_subdirectory(compile_tool)
# install
if(ENABLE_PYTHON)
ie_cpack_add_component(python_tools REQUIRED DEPENDS core)
ie_cpack_add_component(python_tools DEPENDS core)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_tool
DESTINATION deployment_tools/tools

View File

@ -48,10 +48,12 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
# install
ie_cpack_add_component(core_tools DEPENDS core)
install(TARGETS compile_tool
RUNTIME DESTINATION deployment_tools/tools/compile_tool
COMPONENT core)
COMPONENT core_tools)
install(FILES README.md
DESTINATION deployment_tools/tools/compile_tool
COMPONENT core)
COMPONENT core_tools)

View File

@ -53,7 +53,9 @@ endfunction()
if(ENABLE_MYRIAD)
add_perfcheck_target(myriad_perfcheck myriadPlugin)
ie_cpack_add_component(myriad_tools DEPENDS myriad)
install(TARGETS myriad_perfcheck
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH}
COMPONENT myriad)
COMPONENT myriad_tools)
endif()

View File

@ -14,7 +14,7 @@
# install
ie_cpack_add_component(model_optimizer REQUIRED)
ie_cpack_add_component(model_optimizer)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/automation/version.txt.in"