summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormakslevental <maksim.levental@gmail.com>2025-10-14 22:16:02 -0700
committermakslevental <maksim.levental@gmail.com>2025-11-11 10:13:55 -0800
commit0e1862e8f29ef9efe4a97516dca1c6dac6a1865c (patch)
tree6f3ccd1455d2ce670778a0d17b7c8b5c852180ff
parent856555bfd843e50a0d869bf45b58a514b11cbdb6 (diff)
[Python] Bump MLIR Python minimum version to 3.10users/makslevental/bump-python-3.10
-rw-r--r--mlir/cmake/modules/MLIRDetectPythonEnv.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/mlir/cmake/modules/MLIRDetectPythonEnv.cmake b/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
index d18f8c06158b..3644e0074e64 100644
--- a/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
+++ b/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
@@ -1,5 +1,6 @@
# Macros and functions related to detecting details of the Python environment.
+set(MLIR_MINIMUM_PYTHON_VERSION 3.10)
# Finds and configures python packages needed to build MLIR Python bindings.
macro(mlir_configure_python_dev_packages)
if(NOT MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES)
@@ -8,7 +9,7 @@ macro(mlir_configure_python_dev_packages)
# package. This seems to work around cmake bugs searching only for
# Development.Module in some environments. However, in other environments
# it may interfere with the subsequent search for Development.Module.
- find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
+ find_package(Python3 ${MLIR_MINIMUM_PYTHON_VERSION}
COMPONENTS Interpreter Development)
endif()
@@ -19,7 +20,7 @@ macro(mlir_configure_python_dev_packages)
# See https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode
set(_python_development_component Development.Module)
- find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
+ find_package(Python3 ${MLIR_MINIMUM_PYTHON_VERSION}
COMPONENTS Interpreter ${_python_development_component} REQUIRED)
# We look for both Python3 and Python, the search algorithm should be
@@ -39,7 +40,7 @@ macro(mlir_configure_python_dev_packages)
# It's a little silly to detect Python a second time, but nanobind's cmake
# code looks for Python_ not Python3_.
- find_package(Python ${LLVM_MINIMUM_PYTHON_VERSION}
+ find_package(Python ${MLIR_MINIMUM_PYTHON_VERSION}
COMPONENTS Interpreter ${_python_development_component} REQUIRED)
unset(_python_development_component)