35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
|
From c3cba340cfca43f216522464de5fd6f3e060718b Mon Sep 17 00:00:00 2001
|
||
|
From: Dmitry Shachnev <mitya57@gmail.com>
|
||
|
Date: Sat, 4 Jul 2020 13:01:27 +0300
|
||
|
Subject: [PATCH] Update pyqt_sip_dir for pyqt5 compiled with sip5
|
||
|
|
||
|
---
|
||
|
https://github.com/KDE/krita/commit/c3cba340cfca43f216522464de5fd6f3e060718b
|
||
|
cmake/modules/FindPyQt5.py | 6 ++++--
|
||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git cmake/modules/FindPyQt5.py cmake/modules/FindPyQt5.py
|
||
|
index e0ef9d7bdb..e138ad3107 100644
|
||
|
--- cmake/modules/FindPyQt5.py
|
||
|
+++ cmake/modules/FindPyQt5.py
|
||
|
@@ -4,6 +4,7 @@
|
||
|
|
||
|
import sys
|
||
|
import os
|
||
|
+from distutils.sysconfig import get_python_lib
|
||
|
|
||
|
try:
|
||
|
# On Windows and Python 3.8+ python doesn't load module DLL's
|
||
|
@@ -40,8 +41,9 @@
|
||
|
except ValueError:
|
||
|
pass
|
||
|
|
||
|
-# FIXME This next line is just a little bit too crude.
|
||
|
-pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5")
|
||
|
+pyqt_sip_dir = os.path.join(get_python_lib(plat_specific=1), "PyQt5", "bindings")
|
||
|
+if not os.path.exists(pyqt_sip_dir): # Fallback for older PyQt5/SIP
|
||
|
+ pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5")
|
||
|
print("pyqt_sip_dir:%s" % pyqt_sip_dir)
|
||
|
|
||
|
print("pyqt_sip_flags:%s" % PyQt5.QtCore.PYQT_CONFIGURATION["sip_flags"])
|