diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index def3ce96c7e36d..394957b2ab2baa 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -121,34 +121,6 @@ endfunction() ov_check_python_build_conditions() -# check __init__.py files alignment - -function(ov_check_init_files_alignment init_files) - # check the files in pairs - list(LENGTH init_files init_files_count) - math(EXPR file_loop_range "${init_files_count}-2") - foreach(init_file_idx RANGE 0 ${file_loop_range}) - math(EXPR init_file_idx_next "${init_file_idx}+1") - list(GET init_files ${init_file_idx} file1) - list(GET init_files ${init_file_idx_next} file2) - - execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files ${file1} ${file2} - RESULT_VARIABLE compare_result - ) - if(compare_result EQUAL 1) - message(FATAL_ERROR "The runtime __init__.py files are misaligned: ${file1} and ${file2}") - endif() - endforeach() -endfunction() - -set(INIT_FILES_RUNTIME -"${OpenVINOPython_SOURCE_DIR}/src/openvino/__init__.py" -"${OpenVINOPython_SOURCE_DIR}/src/compatibility/openvino/__init__.py" -"${OpenVINO_SOURCE_DIR}/tools/ovc/openvino/__init__.py" -"${OpenVINO_SOURCE_DIR}/tools/benchmark_tool/openvino/__init__.py") - -ov_check_init_files_alignment("${INIT_FILES_RUNTIME}") - ie_option(ENABLE_PYTHON "Enables OpenVINO Python API build" ${ENABLE_PYTHON_DEFAULT}) # diff --git a/src/bindings/python/src/compatibility/openvino/__init__.py b/src/bindings/python/src/compatibility/openvino/__init__.py deleted file mode 100644 index b7dc434f3148cc..00000000000000 --- a/src/bindings/python/src/compatibility/openvino/__init__.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2018-2023 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -__path__ = __import__("pkgutil").extend_path(__path__, __name__) - -# Required for Windows OS platforms -# Note: always top-level -try: - from openvino.utils import _add_openvino_libs_to_search_path - _add_openvino_libs_to_search_path() -except ImportError: - pass - -# # -# # API 2.0 -# # This __init__.py forces checking of runtime modules to propagate errors. -# # It is not compared with init files from openvino-dev package. -# # -# Import all public modules -from openvino import runtime as runtime -from openvino import frontend as frontend -from openvino import helpers as helpers -from openvino import preprocess as preprocess -from openvino import utils as utils -from openvino.runtime import properties as properties - -# Import most important classes and functions from openvino.runtime -from openvino.runtime import Model -from openvino.runtime import Core -from openvino.runtime import CompiledModel -from openvino.runtime import InferRequest -from openvino.runtime import AsyncInferQueue - -from openvino.runtime import Dimension -from openvino.runtime import Strides -from openvino.runtime import PartialShape -from openvino.runtime import Shape -from openvino.runtime import Layout -from openvino.runtime import Type -from openvino.runtime import Tensor -from openvino.runtime import OVAny - -from openvino.runtime import compile_model -from openvino.runtime import get_batch -from openvino.runtime import set_batch -from openvino.runtime import serialize -from openvino.runtime import shutdown -from openvino.runtime import tensor_from_file -from openvino.runtime import save_model -from openvino.runtime import layout_helpers - -# Set version for openvino package -from openvino.runtime import get_version -__version__ = get_version() - -# Tools -try: - # Model Conversion API - ovc should reside in the main namespace - from openvino.tools.ovc import convert_model -except ImportError: - pass diff --git a/tools/benchmark_tool/openvino/__init__.py b/tools/benchmark_tool/openvino/__init__.py deleted file mode 100644 index b7dc434f3148cc..00000000000000 --- a/tools/benchmark_tool/openvino/__init__.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2018-2023 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -__path__ = __import__("pkgutil").extend_path(__path__, __name__) - -# Required for Windows OS platforms -# Note: always top-level -try: - from openvino.utils import _add_openvino_libs_to_search_path - _add_openvino_libs_to_search_path() -except ImportError: - pass - -# # -# # API 2.0 -# # This __init__.py forces checking of runtime modules to propagate errors. -# # It is not compared with init files from openvino-dev package. -# # -# Import all public modules -from openvino import runtime as runtime -from openvino import frontend as frontend -from openvino import helpers as helpers -from openvino import preprocess as preprocess -from openvino import utils as utils -from openvino.runtime import properties as properties - -# Import most important classes and functions from openvino.runtime -from openvino.runtime import Model -from openvino.runtime import Core -from openvino.runtime import CompiledModel -from openvino.runtime import InferRequest -from openvino.runtime import AsyncInferQueue - -from openvino.runtime import Dimension -from openvino.runtime import Strides -from openvino.runtime import PartialShape -from openvino.runtime import Shape -from openvino.runtime import Layout -from openvino.runtime import Type -from openvino.runtime import Tensor -from openvino.runtime import OVAny - -from openvino.runtime import compile_model -from openvino.runtime import get_batch -from openvino.runtime import set_batch -from openvino.runtime import serialize -from openvino.runtime import shutdown -from openvino.runtime import tensor_from_file -from openvino.runtime import save_model -from openvino.runtime import layout_helpers - -# Set version for openvino package -from openvino.runtime import get_version -__version__ = get_version() - -# Tools -try: - # Model Conversion API - ovc should reside in the main namespace - from openvino.tools.ovc import convert_model -except ImportError: - pass diff --git a/tools/ovc/openvino/__init__.py b/tools/ovc/openvino/__init__.py deleted file mode 100644 index b7dc434f3148cc..00000000000000 --- a/tools/ovc/openvino/__init__.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2018-2023 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -__path__ = __import__("pkgutil").extend_path(__path__, __name__) - -# Required for Windows OS platforms -# Note: always top-level -try: - from openvino.utils import _add_openvino_libs_to_search_path - _add_openvino_libs_to_search_path() -except ImportError: - pass - -# # -# # API 2.0 -# # This __init__.py forces checking of runtime modules to propagate errors. -# # It is not compared with init files from openvino-dev package. -# # -# Import all public modules -from openvino import runtime as runtime -from openvino import frontend as frontend -from openvino import helpers as helpers -from openvino import preprocess as preprocess -from openvino import utils as utils -from openvino.runtime import properties as properties - -# Import most important classes and functions from openvino.runtime -from openvino.runtime import Model -from openvino.runtime import Core -from openvino.runtime import CompiledModel -from openvino.runtime import InferRequest -from openvino.runtime import AsyncInferQueue - -from openvino.runtime import Dimension -from openvino.runtime import Strides -from openvino.runtime import PartialShape -from openvino.runtime import Shape -from openvino.runtime import Layout -from openvino.runtime import Type -from openvino.runtime import Tensor -from openvino.runtime import OVAny - -from openvino.runtime import compile_model -from openvino.runtime import get_batch -from openvino.runtime import set_batch -from openvino.runtime import serialize -from openvino.runtime import shutdown -from openvino.runtime import tensor_from_file -from openvino.runtime import save_model -from openvino.runtime import layout_helpers - -# Set version for openvino package -from openvino.runtime import get_version -__version__ = get_version() - -# Tools -try: - # Model Conversion API - ovc should reside in the main namespace - from openvino.tools.ovc import convert_model -except ImportError: - pass