This reverts commit 35edd704e0. Revert the revert and extend the patch further to account for the use of the `PYTHONINTERP_FOUND`.
35edd704e0