Bump cython in cmake (#19473)

* Bump cython in cmake

* Remove the check altogether

* Debug fix

* Updtae docs req

* Add separate cython installation

* Correct python3

* debug

* Add python3-venv package

* Remove source

* Debug

* debug

* pip install flag

* Debug

* Debug

* debug

* debug

* Debug

---------

Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com>
This commit is contained in:
Przemyslaw Wysocki
2023-08-29 16:57:02 +02:00
committed by GitHub
parent f9c0e9690a
commit 35a1840b4b
5 changed files with 18 additions and 11 deletions

View File

@@ -40,11 +40,16 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
python3-dev \
pybind11-dev \
python3-virtualenv \
cython3 \
python3-venv \
tox && \
apt-get clean autoclean && \
apt-get autoremove -y
RUN python3 -m venv ~/.venv
RUN . ~/.venv/bin/activate
RUN which python3
RUN python3 -m pip install "cython>=3.0.0" --break-system-packages
# Build OpenVINO
COPY . /openvino/
WORKDIR /openvino/build
@@ -65,7 +70,8 @@ RUN cmake .. \
-DENABLE_OV_PYTORCH_FRONTEND=ON \
-DENABLE_OV_TF_FRONTEND=OFF \
-DENABLE_OPENVINO_DEBUG=OFF \
-DCMAKE_INSTALL_PREFIX=/openvino/dist
-DCMAKE_INSTALL_PREFIX=/openvino/dist \
-DPYTHON_EXECUTABLE=`which python3`
RUN ninja install
# Run tests via tox

View File

@@ -5,7 +5,7 @@ Babel==2.11.0
beautifulsoup4==4.9.3
certifi==2023.7.22
colorama==0.4.6
Cython==0.29.33
Cython==3.0.2
docutils==0.16
idna==3.4
imagesize==1.2.0

View File

@@ -21,12 +21,13 @@ endif()
include (cmake/UseCython.cmake)
# Check Cython version
if(CYTHON_VERSION VERSION_LESS "0.29")
message(FATAL_ERROR "OpenVINO Python API needs at least Cython version 0.29, found version ${CYTHON_VERSION}")
else()
message(STATUS "Found Cython version ${CYTHON_VERSION}")
endif()
# TODO: Reenable once Windows issue is resolved
# # Check Cython version
# if(CYTHON_VERSION VERSION_LESS "3.0.0")
# message(FATAL_ERROR "OpenVINO Python API needs at least Cython version 3.0.0, found version ${CYTHON_VERSION}")
# else()
# message(STATUS "Found Cython version ${CYTHON_VERSION}")
# endif()
set(pyversion python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})

View File

@@ -50,7 +50,7 @@ include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )
# Find Cython version
execute_process(COMMAND ${CYTHON_EXECUTABLE} -V ERROR_VARIABLE CYTHON_OUTPUT OUTPUT_QUIET)
execute_process(COMMAND ${CYTHON_EXECUTABLE} -V ERROR_VARIABLE CYTHON_OUTPUT)
string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}")
mark_as_advanced( CYTHON_EXECUTABLE CYTHON_VERSION )

View File

@@ -1 +1 @@
cython>=0.29.32
Cython>=3.0.0