11# Macros and functions related to detecting details of the Python environment.
22
3+ set (MLIR_MINIMUM_PYTHON_VERSION 3.10)
34# Finds and configures python packages needed to build MLIR Python bindings.
45macro (mlir_configure_python_dev_packages)
56 if (NOT MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES)
@@ -8,7 +9,7 @@ macro(mlir_configure_python_dev_packages)
89 # package. This seems to work around cmake bugs searching only for
910 # Development.Module in some environments. However, in other environments
1011 # it may interfere with the subsequent search for Development.Module.
11- find_package (Python3 ${LLVM_MINIMUM_PYTHON_VERSION }
12+ find_package (Python3 ${MLIR_MINIMUM_PYTHON_VERSION }
1213 COMPONENTS Interpreter Development)
1314 endif ()
1415
@@ -19,7 +20,7 @@ macro(mlir_configure_python_dev_packages)
1920 # See https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode
2021 set (_python_development_component Development.Module)
2122
22- find_package (Python3 ${LLVM_MINIMUM_PYTHON_VERSION }
23+ find_package (Python3 ${MLIR_MINIMUM_PYTHON_VERSION }
2324 COMPONENTS Interpreter ${_python_development_component} REQUIRED)
2425
2526 # We look for both Python3 and Python, the search algorithm should be
@@ -39,7 +40,7 @@ macro(mlir_configure_python_dev_packages)
3940
4041 # It's a little silly to detect Python a second time, but nanobind's cmake
4142 # code looks for Python_ not Python3_.
42- find_package (Python ${LLVM_MINIMUM_PYTHON_VERSION }
43+ find_package (Python ${MLIR_MINIMUM_PYTHON_VERSION }
4344 COMPONENTS Interpreter ${_python_development_component} REQUIRED)
4445
4546 unset (_python_development_component)
0 commit comments