Fail CMake setup if trying to build with Python 2 (#35612)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35612
Python 2 has reached end-of-life and is no longer supported by PyTorch.
To spare users from a long, doomed build when trying to use PyTorch with
Python 2, detect this case early and fail with a clear message. This
commit covers CMake setup.
Test Plan: Attempted to build PyTorch with Python 2 and saw a clear error *quickly*.
Differential Revision: D20842873
Pulled By: dreiss
fbshipit-source-id: b35e38c12f9381ff4ca10cf801b7a03da87b1d19