|
1 |
| -This patch allow that the opencv's build command correctly detects our version |
2 |
| -of python, so we can successfully build the python bindings (cv2.so) |
3 |
| ---- opencv-4.0.1/cmake/OpenCVDetectPython.cmake.orig 2018-12-22 08:03:30.000000000 +0100 |
4 |
| -+++ opencv-4.0.1/cmake/OpenCVDetectPython.cmake 2019-01-31 11:33:10.896502978 +0100 |
5 |
| -@@ -175,7 +175,7 @@ if(NOT ${found}) |
| 1 | +diff '--color=auto' -uNr opencv-4.12.0/cmake/OpenCVDetectPython.cmake opencv-4.12.0.mod/cmake/OpenCVDetectPython.cmake |
| 2 | +--- opencv-4.12.0/cmake/OpenCVDetectPython.cmake 2025-07-02 13:24:13.000000000 +0530 |
| 3 | ++++ opencv-4.12.0.mod/cmake/OpenCVDetectPython.cmake 2025-09-20 22:22:14.961944470 +0530 |
| 4 | +@@ -175,7 +175,7 @@ |
6 | 5 | endif()
|
7 | 6 | endif()
|
8 |
| - |
9 |
| -- if(NOT ANDROID AND NOT IOS) |
10 |
| -+ if(P4A OR NOT ANDROID AND NOT IOS) |
| 7 | + |
| 8 | +- if(NOT ANDROID AND NOT IOS AND NOT XROS) |
| 9 | ++ if(P4A OR NOT ANDROID AND NOT IOS AND NOT XROS) |
11 | 10 | if(CMAKE_HOST_UNIX)
|
12 |
| - execute_process(COMMAND ${_executable} -c "from distutils.sysconfig import *; print(get_python_lib())" |
| 11 | + execute_process(COMMAND ${_executable} -c "from sysconfig import *; print(get_path('purelib'))" |
13 | 12 | RESULT_VARIABLE _cvpy_process
|
14 |
| -@@ -244,7 +244,7 @@ if(NOT ${found}) |
15 |
| - OUTPUT_STRIP_TRAILING_WHITESPACE) |
16 |
| - endif() |
17 |
| - endif() |
18 |
| -- endif(NOT ANDROID AND NOT IOS) |
19 |
| -+ endif(P4A OR NOT ANDROID AND NOT IOS) |
20 |
| - endif() |
21 |
| - |
22 |
| - # Export return values |
23 |
| ---- opencv-4.0.1/modules/python/CMakeLists.txt.orig 2018-12-22 08:03:30.000000000 +0100 |
24 |
| -+++ opencv-4.0.1/modules/python/CMakeLists.txt 2019-01-31 11:47:17.100494908 +0100 |
| 13 | +diff '--color=auto' -uNr opencv-4.12.0/modules/python/CMakeLists.txt opencv-4.12.0.mod/modules/python/CMakeLists.txt |
| 14 | +--- opencv-4.12.0/modules/python/CMakeLists.txt 2025-07-02 13:24:13.000000000 +0530 |
| 15 | ++++ opencv-4.12.0.mod/modules/python/CMakeLists.txt 2025-09-20 22:23:15.124356524 +0530 |
25 | 16 | @@ -3,7 +3,7 @@
|
26 | 17 | # ----------------------------------------------------------------------------
|
27 | 18 | if(DEFINED OPENCV_INITIAL_PASS) # OpenCV build
|
28 |
| - |
| 19 | + |
29 | 20 | -if(ANDROID OR APPLE_FRAMEWORK OR WINRT)
|
30 | 21 | +if(ANDROID AND NOT P4A OR APPLE_FRAMEWORK OR WINRT)
|
31 | 22 | ocv_module_disable_(python2)
|
|
0 commit comments