Skip to content

Commit

Permalink
clean configs &cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos committed Nov 7, 2023
1 parent 55c375c commit 824c50c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 51 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ./src/bindings/python/requirements.txt
# Add for -DENABLE_PYTHON=ON, no cython
python3 -m pip install -r ./src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# Run cmake with -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT in order to enable codestyle check for ITT collector
- name: CMake configure
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/requirements.txt
# For running Python API tests
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running Paddle frontend unit tests
python3 -m pip install -r ${{ github.workspace }}/src/frontends/paddle/tests/requirements.txt
# For running ONNX frontend unit tests
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ jobs:
python3 -m pip install -U pip
# For Python API: build and wheel packaging
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ jobs:
run: |
# For Python API: build and wheel packaging
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt
Expand Down Expand Up @@ -191,7 +190,6 @@ jobs:
run: |
/usr/bin/python3.8 -m pip install -U pip
/usr/bin/python3.8 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
/usr/bin/python3.8 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
cmake -UPYTHON* \
-DENABLE_PYTHON_PACKAGING=ON \
-DENABLE_TESTS=OFF \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linux_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
python3 -m venv ${OPENVINO_BUILD_DIR}/env
source ${OPENVINO_BUILD_DIR}/env/bin/activate
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
python3 -m pip install conan
- name: Install RISC-V native debian packages
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ jobs:
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt
# For running Python API tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
run: |
# For Python API: build and wheel packaging
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt
Expand Down
47 changes: 8 additions & 39 deletions src/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ endif()
# Check python requirements
#

set(ie_build_python_req "${OpenVINOPython_SOURCE_DIR}/src/compatibility/openvino/requirements-dev.txt")

function(ov_check_python_build_conditions)
# user explicitly specified ENABLE_PYTHON=ON
if(ENABLE_PYTHON)
Expand Down Expand Up @@ -94,42 +92,19 @@ function(ov_check_python_build_conditions)
message(${message_mode} "Python 3.x Interpreter and Development.Module components are not found. OpenVINO Python API will be turned off (ENABLE_PYTHON is OFF)")
endif()

# check for Cython requirement for build IE API 1.0
ov_check_pip_packages(REQUIREMENTS_FILE ${ie_build_python_req}
RESULT_VAR ie_build_python_req_FOUND
WARNING_MESSAGE "install python3 -m pip install -r ${ie_build_python_req} for IE API 1.0 requirements"
MESSAGE_MODE TRACE)

# cython can be installed as a debian package, so pip requirements can be unsatisfied
# so, let's check to find cython anyway
if(NOT ie_build_python_req_FOUND)
find_package(Cython QUIET
PATHS "${OpenVINOPython_SOURCE_DIR}/src/compatibility/openvino/cmake"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
if(CYTHON_VERSION VERSION_GREATER_EQUAL 0.29)
set(ie_build_python_req_FOUND ON)
else()
message(${message_mode} "Python requirements '${ie_build_python_req}' are missed, IE Python API 1.0 will not be built (ENABLE_PYTHON is OFF)")
endif()
endif()

if(NOT OV_GENERATOR_MULTI_CONFIG AND CMAKE_BUILD_TYPE STREQUAL "Debug" AND CMAKE_DEBUG_POSTFIX)
set(python_debug ON)
message(${message_mode} "Building python bindings in debug configuration is not supported on your platform (ENABLE_PYTHON is OFF)")
else()
set(python_debug OFF)
endif()

if((Python3_Development.Module_FOUND OR Python3_Development_FOUND) AND
ie_build_python_req_FOUND AND NOT python_debug)
if((Python3_Development.Module_FOUND OR Python3_Development_FOUND) AND NOT python_debug)
set(ENABLE_PYTHON_DEFAULT ON PARENT_SCOPE)
else()
set(ENABLE_PYTHON_DEFAULT OFF PARENT_SCOPE)
endif()

# to disable API 1.0
set(ie_build_python_req_FOUND ${ie_build_python_req_FOUND} PARENT_SCOPE)
endfunction()

ov_check_python_build_conditions()
Expand Down Expand Up @@ -207,13 +182,13 @@ endif()
# since wheels can be built only together with main OV build
ov_dependent_option(ENABLE_WHEEL "Build wheel packages for PyPI" ${ENABLE_WHEEL_DEFAULT} "ENABLE_PYTHON;NOT OpenVINODeveloperPackage_RELOCATABLE" OFF)

if(NOT ENABLE_PYTHON)
if(CMAKE_SOURCE_DIR STREQUAL OpenVINOPython_SOURCE_DIR)
message(FATAL_ERROR "Python OpenVINO API build requirements are not satisfied. Please, install ${ie_build_python_req}")
else()
return()
endif()
endif()
# if(NOT ENABLE_PYTHON)
# if(CMAKE_SOURCE_DIR STREQUAL OpenVINOPython_SOURCE_DIR)
# message(FATAL_ERROR "Python OpenVINO API build requirements are not satisfied. Please, install ${ie_build_python_req}")
# else()
# return()
# endif()
# endif()

if(NOT SETUP_PY_REQUIREMENTS_FOUND AND ENABLE_PYTHON_PACKAGING)
message(FATAL_ERROR "Python cannot be packaged, because setup.py requirements are not satisfied (cmake version >= 3.15 is required, provided ${CMAKE_VERSION})")
Expand All @@ -239,12 +214,6 @@ endif()
add_subdirectory(src/compatibility/pyngraph)
add_subdirectory(src/pyopenvino)

if(ie_build_python_req_FOUND)
add_subdirectory(src/compatibility/openvino)
else()
message(WARNING "NOTE: Python API for OpenVINO 1.0 is disabled")
endif()

#
# Packaging
#
Expand Down

0 comments on commit 824c50c

Please sign in to comment.