[libcxx-commits] [PATCH] D107715: [libc++][NFC] Resolve Python 2 FIXME

Shivam Gupta via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Oct 2 20:24:01 PDT 2021


xgupta added inline comments.


================
Comment at: libcxx/CMakeLists.txt:47
   if(NOT Python3_Interpreter_FOUND)
-    message(WARNING "Python3 not found, using python2 as a fallback")
-    find_package(Python2 COMPONENTS Interpreter REQUIRED)
-    if(Python2_VERSION VERSION_LESS 2.7)
-      message(SEND_ERROR "Python 2.7 or newer is required")
-    endif()
-
-    # Treat python2 as python3
-    add_executable(Python3::Interpreter IMPORTED)
-    set_target_properties(Python3::Interpreter PROPERTIES
-      IMPORTED_LOCATION ${Python2_EXECUTABLE})
-    set(Python3_EXECUTABLE ${Python2_EXECUTABLE})
+    message(SEND_ERROR "Python3 not found. Python3 is required")
   endif()
----------------
jloser wrote:
> Does this message provide anything useful from just adding `REQUIRED` argument to the `find_package(Python3 COMPONENTS Interpreter)` right above?
@gAlfonso-bit can you address this comment. so I can commit this patch on your behalf.


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

https://reviews.llvm.org/D107715



More information about the libcxx-commits mailing list