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

Switch to FindPython3 in CMake (policy 0148) #25600

Open
4 tasks done
asmorkalov opened this issue May 16, 2024 · 2 comments
Open
4 tasks done

Switch to FindPython3 in CMake (policy 0148) #25600

asmorkalov opened this issue May 16, 2024 · 2 comments

Comments

@asmorkalov
Copy link
Contributor

System Information

Details: https://cmake.org/cmake/help/latest/policy/CMP0148.html
Related Patch: #25585

Detailed description

Current approach was deprecated with CMake

Steps to reproduce

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)
@FantasqueX
Copy link
Contributor

I have some questions about this issue.

  1. FindPython3 was introduced in CMake 3.12 and OpenCV's cmake_minimum_required is 3.5(3.1). So, should we keep both old FindPythonInterp and FindPythonLibs and new FindPython3?
  2. Currently, OpenCV has both Python2 and Python3 bindings. However, Python2 reached end of life on January 1, 2020 and you only mentioned FindPython3. Should we still keep Python2 binding?

@asmorkalov
Copy link
Contributor Author

  1. Looks like, yes. We have to support both branches for now. The team investigates an option to raise minimum CMake version, but for 5.x for now.
  2. Python2 is not supported by OpenCV team any more. We do not test it regularly and do not produce opencv-python packages. So, I think we can safely drop Python2 support with latest CMake.

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

No branches or pull requests

3 participants