aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyan Pasu <nyanpasu64@tuta.io>2021-10-05 12:25:02 +0000
committerChristophe Giboudeaux <christophe@krop.fr>2021-10-05 12:25:02 +0000
commita18543d73203b6175a9a3531486f31ee62bcf42e (patch)
tree8ba43b9b7a56f85a215e7b3a327861996b2f1e81
parent8abe35b4214a24470dd5f8c0949f67253e10374b (diff)
downloadextra-cmake-modules-a18543d73203b6175a9a3531486f31ee62bcf42e.tar.gz
extra-cmake-modules-a18543d73203b6175a9a3531486f31ee62bcf42e.tar.bz2
Fix ECM on systems without PyQt5 on Python 2
-rw-r--r--find-modules/FindPythonModuleGeneration.cmake2
-rw-r--r--find-modules/sip_generator.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/find-modules/FindPythonModuleGeneration.cmake b/find-modules/FindPythonModuleGeneration.cmake
index 6104c1f4..0640b09a 100644
--- a/find-modules/FindPythonModuleGeneration.cmake
+++ b/find-modules/FindPythonModuleGeneration.cmake
@@ -260,7 +260,7 @@ else()
message(STATUS "Found ${libclang_LIBRARY}")
endif()
-foreach (pyversion "2" "3")
+foreach (pyversion "3" "2")
set(GPB_PYTHON_COMMAND ${GPB_PYTHON${pyversion}_COMMAND})
if (NOT GPB_PYTHON_COMMAND)
continue()
diff --git a/find-modules/sip_generator.py b/find-modules/sip_generator.py
index 548d798b..e6627ae3 100644
--- a/find-modules/sip_generator.py
+++ b/find-modules/sip_generator.py
@@ -792,4 +792,5 @@ if __name__ == "__main__":
if sys.argv[1] != "--self-check":
sys.exit(main())
else:
+ from PyQt5.Qt import PYQT_CONFIGURATION
cindex.Config.set_library_file(sys.argv[2])