[PATCH] D78762: build: use `find_package(Python3)` if available

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 15:39:43 PDT 2020


smeenai added a comment.

In D78762#2006406 <https://reviews.llvm.org/D78762#2006406>, @JDevlieghere wrote:

> I talked to Saleem and he cleared up some of my concerns. Given that the community seems to have agreed to support only Python 3, this change seems a lot more reasonable. My earlier comment was made under the impression that we were going to continue supporting Python 2. With that in mind, the burden should fall on LLDB if we want to continue supporting it. Python 2 will be a "special case" then, rather than another first class citizen. With all that said, this LGTM.


To be clear, the plan is to support Python 2 till Jan 2021 or so. Given that this has the fallback though, it LGTM (with the comments addressed).

http://lists.llvm.org/pipermail/llvm-dev/2020-January/138730.html is the discussion for LLVM's Python 2/3 plans.



================
Comment at: llvm/CMakeLists.txt:696
+    message(WARNING "Python3 not found, using python2 as a fallback")
+    find_package(Python3 COMPONENTS Interpreter REQUIRED)
+    if(Python2_VERSION VERSION_LESS 2.7)
----------------
Python2


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78762/new/

https://reviews.llvm.org/D78762





More information about the cfe-commits mailing list