Skip to content

Commit 822aa1e

Browse files
committedOct 24, 2023
cmake: add a patch to build on fedora38. Fixes #54348
1 parent 35e7f15 commit 822aa1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,14 @@ else()
10221022
find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter)
10231023
endif()
10241024

1025+
# Fix python site-packages for Fedora
1026+
# See https://github.com/qgis/QGIS/issues/54348#issuecomment-1694216152
1027+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
1028+
if(EXISTS "/etc/fedora-release")
1029+
EXECUTE_PROCESS(COMMAND ${Python_EXECUTABLE} -c "import sysconfig;print(sysconfig.get_path(\"platlib\", \"rpm_prefix\"), end=\"\")" OUTPUT_VARIABLE Python_SITEARCH)
1030+
endif()
1031+
endif()
1032+
10251033
message("-- Found Python executable: ${Python_EXECUTABLE} (version ${Python_VERSION})")
10261034
message("-- Python library: ${Python_LIBRARIES}")
10271035
message("-- Python site-packages: ${Python_SITEARCH}")

0 commit comments

Comments
 (0)
Please sign in to comment.