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

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 3 13:06:55 PDT 2021


jloser 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()
----------------
Does this message provide anything useful from just adding `REQUIRED` argument to the `find_package(Python3 COMPONENTS Interpreter)` right above?


================
Comment at: libcxx/utils/ci/runtimes/CMakeLists.txt:6
 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()
----------------
Does this message provide anything useful from just adding `REQUIRED` argument to the `find_package(Python3 COMPONENTS Interpreter)` right above?


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

https://reviews.llvm.org/D107715



More information about the libcxx-commits mailing list