From 70a8d61ca1d420a772fde9f471db1231cae088f5 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Fri, 8 Oct 2021 05:18:44 +0000 Subject: [PATCH] evert "[mlir] Limit Python dependency to Development.Module when possible." This reverts commit 7aebdfc4fcc4a2667f5d5c30ffbdc146f9b014d2. The build is broken with errors like: GPUPasses.cpp:(.text.pybind11_object_init[pybind11_object_init]+0x118): undefined reference to `PyExc_TypeError' --- mlir/CMakeLists.txt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt index 2f0e8b214bff..b7ac3bdc543f 100644 --- a/mlir/CMakeLists.txt +++ b/mlir/CMakeLists.txt @@ -112,17 +112,8 @@ set(MLIR_BINDINGS_PYTHON_LOCK_VERSION 1 CACHE BOOL if(MLIR_ENABLE_BINDINGS_PYTHON) include(MLIRDetectPythonEnv) - # After CMake 3.18, we are able to limit the scope of the search to just - # Development.Module. Searching for Development will fail in manylinux builds, - # and isn't necessary since we are not embedding the Python interpreter. - # See https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode - if(${CMAKE_VERSION} VERSION_LESS "3.18.0") - set(_python_development_component Development) - else() - set(_python_development_component Development.Module) - endif() find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} - COMPONENTS Interpreter ${_python_development_component} NumPy REQUIRED) + COMPONENTS Interpreter Development NumPy REQUIRED) message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}") message(STATUS "Found python libraries: ${Python3_LIBRARIES}") message(STATUS "Found numpy v${Python3_NumPy_VERSION}: ${Python3_NumPy_INCLUDE_DIRS}")