Skip to content

Commit

Permalink
Merge pull request qgis#57218 from troopa81/fix_sip_mod_dir
Browse files Browse the repository at this point in the history
[Qt6][Sip] Correctly retrieve PyQt module directory
  • Loading branch information
m-kuhn authored Apr 25, 2024
2 parents 581589a + 32cd014 commit 1f00b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmake/FindPyQt5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ELSE(EXISTS PYQT5_VERSION_STR)
ENDIF(_pyqt5_metadata)

IF(PYQT5_VERSION_STR)
SET(PYQT5_MOD_DIR "${Python_SITEARCH}/PyQt5")
SET(PYQT5_SIP_DIR "${Python_SITEARCH}/PyQt5/bindings")
EXECUTE_PROCESS(COMMAND ${Python_EXECUTABLE} -c "import os; import PyQt5; print(os.path.dirname(PyQt5.__file__), end='')" OUTPUT_VARIABLE PYQT5_MOD_DIR)
SET(PYQT5_SIP_DIR "${PYQT5_MOD_DIR}/bindings")
FIND_PROGRAM(__pyuic5 "pyuic5")
GET_FILENAME_COMPONENT(PYQT5_BIN_DIR ${__pyuic5} DIRECTORY)

Expand Down
4 changes: 2 additions & 2 deletions cmake/FindPyQt6.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ELSE(EXISTS PYQT6_VERSION_STR)
ENDIF(_pyqt6_metadata)

IF(PYQT6_VERSION_STR)
SET(PYQT6_MOD_DIR "${Python_SITEARCH}/PyQt6")
SET(PYQT6_SIP_DIR "${Python_SITEARCH}/PyQt6/bindings")
EXECUTE_PROCESS(COMMAND ${Python_EXECUTABLE} -c "import os; import PyQt6; print(os.path.dirname(PyQt6.__file__), end='')" OUTPUT_VARIABLE PYQT6_MOD_DIR)
SET(PYQT6_SIP_DIR "${PYQT6_MOD_DIR}/bindings")
FIND_PROGRAM(__pyuic6 "pyuic6")
GET_FILENAME_COMPONENT(PYQT6_BIN_DIR ${__pyuic6} DIRECTORY)

Expand Down

0 comments on commit 1f00b40

Please sign in to comment.