File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,9 @@ set(MLIR_PYTHON_BINDINGS_VERSION_LOCKED 1 CACHE BOOL
78
78
"Links to specific python libraries, resolving all symbols." )
79
79
80
80
if (MLIR_BINDINGS_PYTHON_ENABLED )
81
- find_package (PythonInterp REQUIRED )
82
- find_package (PythonLibs REQUIRED )
83
- message (STATUS "Found python include dirs: ${PYTHON_INCLUDE_DIRS} " )
84
- message (STATUS "Found python libraries: ${PYTHON_LIBRARIES} " )
81
+ find_package (Python3 COMPONENTS Interpreter Development REQUIRED )
82
+ message (STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS} " )
83
+ message (STATUS "Found python libraries: ${Python3_LIBRARIES} " )
85
84
find_package (pybind11 CONFIG REQUIRED )
86
85
# TODO: pybind11 v2.6 switched from pybind11_INCLUDE_DIRS (plural) to
87
86
# pybind11_INCLUDE_DIR (singular). A lot has changed in this area since this
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ function(add_mlir_python_extension libname extname)
24
24
# symbols, which is better for development. Note that not all python
25
25
# configurations provide build-time libraries to link against, in which
26
26
# case, we fall back to MODULE linking.
27
- if (PYTHON_LIBRARIES STREQUAL "" OR NOT MLIR_PYTHON_BINDINGS_VERSION_LOCKED )
27
+ if (Python3_LIBRARIES STREQUAL "" OR NOT MLIR_PYTHON_BINDINGS_VERSION_LOCKED )
28
28
set (PYEXT_LINK_MODE MODULE )
29
29
set (PYEXT_LIBADD )
30
30
else ()
31
31
set (PYEXT_LINK_MODE SHARED )
32
- set (PYEXT_LIBADD ${PYTHON_LIBRARIES } )
32
+ set (PYEXT_LIBADD ${Python3_LIBRARIES } )
33
33
endif ()
34
34
35
35
# The actual extension library produces a shared-object or DLL and has
@@ -40,7 +40,7 @@ function(add_mlir_python_extension libname extname)
40
40
)
41
41
42
42
target_include_directories (${libname} PRIVATE
43
- "${PYTHON_INCLUDE_DIRS } "
43
+ "${Python3_INCLUDE_DIRS } "
44
44
"${pybind11_INCLUDE_DIR} "
45
45
)
46
46
You can’t perform that action at this time.
0 commit comments