From 71ab5028dee4e7ea16ebcd61ca90f8430c2161da Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 11 Dec 2020 11:34:54 +0100 Subject: [PATCH] Remove Python2 fallback and only advertise Python3 in the doc Differential Revision: https://www.youtube.com/watch?v=RsL0cipURA0 --- CMakeLists.txt | 15 +-------------- docs/GettingStarted.rst | 2 +- docs/GettingStartedVS.rst | 2 +- docs/HowToBuildOnARM.rst | 1 - docs/TestingGuide.rst | 2 +- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54009573ed4..ee1b646ab65 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -708,20 +708,7 @@ set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER FALSE CACHE BOOL include(HandleLLVMOptions) -find_package(Python3 COMPONENTS Interpreter) -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}) -endif() +find_package(Python3 REQUIRED COMPONENTS Interpreter) ###### diff --git a/docs/GettingStarted.rst b/docs/GettingStarted.rst index 05d2994fed2..d4e4a3b0392 100644 --- a/docs/GettingStarted.rst +++ b/docs/GettingStarted.rst @@ -170,7 +170,7 @@ Package Version Notes =========================================================== ============ ========================================== `CMake `__ >=3.13.4 Makefile/workspace generator `GCC `_ >=5.1.0 C/C++ compiler\ :sup:`1` -`python `_ >=2.7 Automated test suite\ :sup:`2` +`python `_ >=3.6 Automated test suite\ :sup:`2` `zlib `_ >=1.2.3.4 Compression library\ :sup:`3` `GNU Make `_ 3.79, 3.79.1 Makefile/build processor\ :sup:`4` =========================================================== ============ ========================================== diff --git a/docs/GettingStartedVS.rst b/docs/GettingStartedVS.rst index 84d0ecf4d8f..2ed4397ac39 100644 --- a/docs/GettingStartedVS.rst +++ b/docs/GettingStartedVS.rst @@ -51,7 +51,7 @@ You will also need the `CMake `_ build system since it generates the project files you will use to build with. If you would like to run the LLVM tests you will need `Python -`_. Version 2.7 and newer are known to work. You will +`_. Version 3.6 and newer are known to work. You will need `GnuWin32 `_ tools, too. Do not install the LLVM directory tree into a path containing spaces (e.g. diff --git a/docs/HowToBuildOnARM.rst b/docs/HowToBuildOnARM.rst index f28f8b3ae2d..9eb6b5a2ca1 100644 --- a/docs/HowToBuildOnARM.rst +++ b/docs/HowToBuildOnARM.rst @@ -41,7 +41,6 @@ on the ARMv6 and ARMv7 architectures and may be inapplicable to older chips. Use Ninja instead of Make: "-G Ninja" Build with assertions on: "-DLLVM_ENABLE_ASSERTIONS=True" - Force Python2: "-DPYTHON_EXECUTABLE=/usr/bin/python2" Local (non-sudo) install path: "-DCMAKE_INSTALL_PREFIX=$HOME/llvm/install" CPU flags: "DCMAKE_C_FLAGS=-mcpu=cortex-a15" (same for CXX_FLAGS) diff --git a/docs/TestingGuide.rst b/docs/TestingGuide.rst index 4ca1a359b64..0f912920575 100644 --- a/docs/TestingGuide.rst +++ b/docs/TestingGuide.rst @@ -23,7 +23,7 @@ Requirements ============ In order to use the LLVM testing infrastructure, you will need all of the -software required to build LLVM, as well as `Python `_ 2.7 or +software required to build LLVM, as well as `Python `_ 3.6 or later. LLVM Testing Infrastructure Organization