Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCVDetectPython.cmake: prefer using FindPython #1133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CodeChenL
Copy link

Reason for change:

  1. PythonInterp will misdetect Python3 as Python2 in distributions using newer versions of CMake:
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.2", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.11.so (found suitable exact version "3.11.2")
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.2", minimum required is "3")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.11.so (found suitable exact version "3.11.2")
  1. PythonInterp will be removed soon and unusable: https://cmake.org/cmake/help/latest/module/FindPythonInterp.html, for Debian that is Debian 13

Reason for change:

1. PythonInterp will misdetect Python3 as Python2 in distributions using newer versions of CMake:

```
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.2", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.11.so (found suitable exact version "3.11.2")
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.2", minimum required is "3")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.11.so (found suitable exact version "3.11.2")
```

2. PythonInterp will be removed soon and unusable: https://cmake.org/cmake/help/latest/module/FindPythonInterp.html, for Debian that is Debian 13

Signed-off-by: Chen Jiali <[email protected]>
@RadxaYuntian
Copy link
Contributor

Hi @tingleby, can you take a look at this PR? This issue currently causes build failure when we cross build from AMD64 to ARM64 on Debian 12, thus blocking us from release prebuilt package to our users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants