Use FindPython3.cmake (#19847)
* Use FindPython3.cmake
* Fixed compilation on macOS 14 with new core development tools
* Try to use Python3_SOABI instead of PYTHON_MODULE_EXTENSION
* Use Development.Module
* Keep specifying only Python3_EXECUTABLE
* Print PYTHON_MODULE_EXTENSION
* Added check for minimal cmake version for python API
* Returned Python3_INCLUDE_DIR for cross-compilation case
* Try to allow cmake older than 3.18
* Use build python interpreter to check cython dependency
* revert changes in .ci/openvino-onnx/Dockerfile
* removed unused code
* Fixed issue with variables scope
* Experiment: remove include dirs
* Corrected docs
* Use pybind11 function to set extension
* Revert "Experiment: remove include dirs"
This reverts commit 6f7f90211c.
* Refactor ConvolutionBackpropDataLayerTest, ConvolutionLayerTest, DeformableConvolutionLayerTest (#19810)
* Refactor ConvolutionBackpropDataLayerTest
* Refactor ConvolutionLayerTest
* Refactor DeformableConvolutionLayerTest
* Apply comments
* Apply comments
* Fix
* Updated minimum cmake version for Windows
* Simplified check
* Removed useless message status
* Use puiblic option
---------
Co-authored-by: Oleg Pipikin <oleg.pipikin@intel.com>
This commit is contained in:
1 parent
7852b44c5f
commit
8349849e1c
53 files changed
+237
-238
No files matched your search
@@ -9,7 +9,7 @@
|
||||
# [MESSAGE_MODE <WARNING | FATAL_ERROR | TRACE>])
|
||||
#
|
||||
function(ov_check_pip_package)
|
||||
find_host_package(PythonInterp 3 QUIET)
|
||||
find_host_package(Python3 QUIET COMPONENTS Interpreter)
|
||||
|
||||
set(oneValueOptionalArgs
|
||||
MESSAGE_MODE # Set the type of message: { FATAL_ERROR | WARNING | ... }
|
||||
@@ -42,19 +42,21 @@ function(ov_check_pip_package)
|
||||
# quote '3.x' with \'3.x\'
|
||||
string(REPLACE "'" "\\'" REQ "${ARG_REQUIREMENT}")
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
if(Python3_Interpreter_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import pkg_resources ; pkg_resources.require('${REQ}')"
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import pkg_resources ; pkg_resources.require('${REQ}')"
|
||||
RESULT_VARIABLE EXIT_CODE
|
||||
OUTPUT_VARIABLE OUTPUT_TEXT
|
||||
ERROR_VARIABLE ERROR_TEXT)
|
||||
else()
|
||||
set(EXIT_CODE 1)
|
||||
endif()
|
||||
|
||||
if(NOT EXIT_CODE EQUAL 0)
|
||||
if(EXIT_CODE EQUAL 0)
|
||||
set(${ARG_RESULT_VAR} ON PARENT_SCOPE)
|
||||
else()
|
||||
set(${ARG_RESULT_VAR} OFF PARENT_SCOPE)
|
||||
message(${ARG_MESSAGE_MODE} "Python module '${REQ}' is missed, ${ARG_WARNING_MESSAGE}")
|
||||
else()
|
||||
set(${ARG_RESULT_VAR} ON PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -65,7 +67,7 @@ endfunction()
|
||||
# [MESSAGE_MODE <WARNING | FATAL_ERROR | TRACE>])
|
||||
#
|
||||
function(ov_check_pip_packages)
|
||||
find_host_package(PythonInterp 3 QUIET)
|
||||
find_host_package(Python3 QUIET COMPONENTS Interpreter)
|
||||
|
||||
set(oneValueOptionalArgs
|
||||
MESSAGE_MODE # Set the type of message: { FATAL_ERROR | WARNING | ... }
|
||||
@@ -95,9 +97,9 @@ function(ov_check_pip_packages)
|
||||
message(SEND_ERROR "Unexpected parameters have passed to the function: ${ARG_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
if(Python3_Interpreter_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "
|
||||
COMMAND ${Python3_EXECUTABLE} -c "
|
||||
from check_python_requirements import check_python_requirements ;
|
||||
check_python_requirements('${ARG_REQUIREMENTS_FILE}') ;
|
||||
"
|
||||
@@ -105,12 +107,14 @@ check_python_requirements('${ARG_REQUIREMENTS_FILE}') ;
|
||||
RESULT_VARIABLE EXIT_CODE
|
||||
OUTPUT_VARIABLE OUTPUT_TEXT
|
||||
ERROR_VARIABLE ERROR_TEXT)
|
||||
else()
|
||||
set(EXIT_CODE 1)
|
||||
endif()
|
||||
|
||||
if(NOT EXIT_CODE EQUAL 0)
|
||||
if(EXIT_CODE EQUAL 0)
|
||||
set(${ARG_RESULT_VAR} ON PARENT_SCOPE)
|
||||
else()
|
||||
set(${ARG_RESULT_VAR} OFF PARENT_SCOPE)
|
||||
message(${ARG_MESSAGE_MODE} "Python requirement file ${ARG_REQUIREMENTS_FILE} is not installed, ${ARG_WARNING_MESSAGE}")
|
||||
else()
|
||||
set(${ARG_RESULT_VAR} ON PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in new issue
Block a user