First, this should be in cmake/OpenCVDetectPython.cmake.

Second, I'm not sure this should be anywhere at all, because it makes a subtle error - it checks the Python executable we found, instead of the one that will be used by `sphinx-build` (and I think we did receive reports where they're not the same).

I don't think we can easily get the Python executable used by `sphinx-build`, but maybe we don't need to. You can try importing it in the Sphinx config, and if it fails, print a warning. You won't be able to report on its presense in the CMake status, but maybe that's okay.

@asmorkalov Is that okay?