Skip to content

Commit 3263674

Browse files
committed
Don't use ov from python
1 parent 4f9ed01 commit 3263674

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

.github/workflows/test_accuracy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ jobs:
4040
sudo bash src/cpp/install_dependencies.sh
4141
- name: Build CPP Test
4242
run: |
43-
pip install nanobind==2.4.0
44-
pip install typing_extensions==4.12.2
43+
source venv/bin/activate
4544
mkdir build && cd build
46-
cmake ../tests/cpp/accuracy/
45+
cmake ../tests/cpp/accuracy/ -DPython_ROOT_DIR=$(python -c "import sys; print(sys.prefix)")
4746
make -j
4847
- name: Run CPP Test
4948
run: |

src/cpp/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,8 @@ endif()
3333

3434
find_package(OpenCV REQUIRED COMPONENTS core imgproc)
3535

36-
# Looking for OpenVINO in the python distribution. It doesn't work for cross-compiling build
37-
if(NOT CMAKE_CROSSCOMPILING)
38-
find_package(Python3 REQUIRED)
39-
execute_process(
40-
COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"
41-
OUTPUT_VARIABLE OpenVINO_DIR_PY
42-
ERROR_QUIET
43-
)
44-
endif()
45-
4636
find_package(OpenVINO REQUIRED
47-
COMPONENTS Runtime Threading
48-
HINTS "${OpenVINO_DIR_PY}")
37+
COMPONENTS Runtime Threading)
4938

5039
include(FetchContent)
5140
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)

src/cpp/py_bindings/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
# SPDX-License-Identifier: Apache-2.0
33
#
44

5-
set(DEV_MODULE Development.Module)
6-
7-
find_package(Python COMPONENTS Interpreter ${DEV_MODULE} REQUIRED)
5+
set(Python_FIND_VIRTUALENV FIRST)
6+
find_package(Python COMPONENTS Interpreter Development REQUIRED)
87

98
execute_process(
109
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir

0 commit comments

Comments
 (0)