|
|
@ -295,7 +295,12 @@ find_python("${OPENCV_PYTHON3_VERSION}" "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYT |
|
|
|
OCV_OPTION(PYTHON3_LIMITED_API "Build with Python Limited API (not available with numpy >=1.15 <1.17)" NO |
|
|
|
OCV_OPTION(PYTHON3_LIMITED_API "Build with Python Limited API (not available with numpy >=1.15 <1.17)" NO |
|
|
|
VISIBLE_IF PYTHON3_NUMPY_VERSION VERSION_LESS "1.15" OR NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.17") |
|
|
|
VISIBLE_IF PYTHON3_NUMPY_VERSION VERSION_LESS "1.15" OR NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.17") |
|
|
|
if(PYTHON3_LIMITED_API) |
|
|
|
if(PYTHON3_LIMITED_API) |
|
|
|
set(PYTHON3_LIMITED_API_VERSION "0x03060000" CACHE STRING "Minimal Python version for Limited API") |
|
|
|
set(_default_ver "0x03060000") |
|
|
|
|
|
|
|
if(PYTHON3_VERSION_STRING VERSION_LESS "3.6") |
|
|
|
|
|
|
|
# fix for older pythons |
|
|
|
|
|
|
|
set(_default_ver "0x030${PYTHON3_VERSION_MINOR}0000") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
set(PYTHON3_LIMITED_API_VERSION ${_default_ver} CACHE STRING "Minimal Python version for Limited API") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
if(PYTHON_DEFAULT_EXECUTABLE) |
|
|
|
if(PYTHON_DEFAULT_EXECUTABLE) |
|
|
|